Try and Catch

Hi…
Recently changed my project and at this location, ETL developers are using Try and catch for each and every dataflow, When asked why? they say its a good coding standard and having try and catch can help them identify where the error occured. (In case of any failures, they are using raise_exception inside catch using a script.)

I am a bit confused…I used try and catch in the previous project only once (and that was because we had a certain window time, before the source connection was closed, try and catch was implemented for template tables which refresh descriptions).

If someone can help me understand, is it worth to have a try and catch block for each and every dataflow?

Thanks,
Tarun


Tarunvig :us: (BOB member since 2011-01-18)

19 Hits and no replies…

Well I feel Royally Ignored…


Tarunvig :us: (BOB member since 2011-01-18)

Hmm that is sort of answer I tend to nod at it.

If the piece of Workflows are pretty re-usable then it is good to have try-catch individually.

Yes certainly try-catch is writing exceptions and having them on individual thing make the life messy as you would start getting too much errors!!!which always don’t look good.

And the way the Catch blocks get called is some kinda behavior i keep forget…

I would conclude that we can have try-catch but on reasonable levels of workflow…not on dataflows though

May be all those 19 looking for the answer man!!!


ganeshxp :us: (BOB member since 2008-07-17)

Thanks Ganesh…

I agree with you…Was confused so wanted to understand a little better on try and catch block usage.

have gone through the user manual and quite understand where and why to use it.

Thanks again…


Tarunvig :us: (BOB member since 2011-01-18)

I found this thread while looking up a try/catch issue. My thought is that unless you are actually doing something useful in the catch there is absolutely no reason to code a try/catch around a Dataflow.

By something useful I mean that the exception is getting handled by doing something else or you are handling the exception because you want the job to continue.

If all they are doing is reraising the exception then that is a waste of time.


eganjp :us: (BOB member since 2007-09-12)