"Barry Kelly" <✉eircom.net> wrote in message news:✉4ax.com...
> > Why do you need to handle the errors? If you really need to handle the > errors, then (IMO) the operations should be in completely separate > functions, so that you can eliminate the drudgery of handling the same > errors over and over again.
Correct, this is a factoring exercise and is usually incurred at some point (sooner or later) unless we are talking about a very very specific sequence (like a system self test sequence which is specified to abort after the first detected error...)
> If you feel it's cluttered, have you considered making your operations > nested functions, like: > <snip, grokked code> > > Just an idea; it works for me. >
An interesting approach in some cases, certainly.
Kristofer