What is the idiomatic way to process data through a number of functions, checking for errors after each function?

A great discussion on the topic here: