Author |
Message
|
girish_tharwani |
Posted: Wed Feb 25, 2009 4:21 am Post subject: Throw in Compute |
|
|
 Voyager
Joined: 01 Aug 2001 Posts: 88 Location: Pune, India
|
If I use “Throw” statement to raise an exception in a compute node, will it be considered internal error of this node and propagated to failure terminal of this node (assume failure terminal is connected) or will it be sent back to nearest MQInput node for handling via Catch terminal.
I think it should be internal error routed to failure terminal.
Could not find a clear answer in manuals so I am doing a small test setup to check it out.. meanwhile you give me your thoughts. |
|
Back to top |
|
 |
MQEnthu |
Posted: Wed Feb 25, 2009 4:32 am Post subject: |
|
|
 Partisan
Joined: 06 Oct 2008 Posts: 329 Location: India
|
Quote: |
If I use “Throw” statement to raise an exception in a compute node, will it be considered internal error of this node and propagated to failure terminal of this node (assume failure terminal is connected) or will it be sent back to nearest MQInput node for handling via Catch terminal. |
If failure terminal of compute node is connected, then the message will be routed to failure terminal _________________ -----------------------------------------------
It is good to remember the past,
but don't let past capture your future |
|
Back to top |
|
 |
Vitor |
Posted: Wed Feb 25, 2009 4:36 am Post subject: Re: Throw in Compute |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
girish_tharwani wrote: |
will it be sent back to nearest MQInput node for handling via Catch terminal.
|
Pedantically this should read "sent back for handling via Catch terminal" - you could have a try/catch node in the flow before the MQInput.
Not relevant to your question, but just to pre-empt further queries. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
kash3338 |
Posted: Wed Feb 25, 2009 5:16 am Post subject: Re: Throw in Compute |
|
|
Shaman
Joined: 08 Feb 2009 Posts: 709 Location: Chennai, India
|
girish_tharwani wrote: |
If I use “Throw” statement to raise an exception in a compute node, will it be considered internal error of this node and propagated to failure terminal of this node (assume failure terminal is connected) or will it be sent back to nearest MQInput node for handling via Catch terminal.
I think it should be internal error routed to failure terminal.
Could not find a clear answer in manuals so I am doing a small test setup to check it out.. meanwhile you give me your thoughts. |
If the failure terminal of your compute node is connected, it will propagate to that node else it rebounds to the catch of the MQInput node. |
|
Back to top |
|
 |
MQEnthu |
Posted: Wed Feb 25, 2009 5:20 am Post subject: |
|
|
 Partisan
Joined: 06 Oct 2008 Posts: 329 Location: India
|
kash3338 wrote: |
...else it rebounds to the catch of the MQInput node. |
As Vitor pointed out, message will be sent back to the catch terminal of the previous node (TryCatch node could have been connected..) _________________ -----------------------------------------------
It is good to remember the past,
but don't let past capture your future |
|
Back to top |
|
 |
girish_tharwani |
Posted: Wed Feb 25, 2009 5:31 am Post subject: Throw in Compute |
|
|
 Voyager
Joined: 01 Aug 2001 Posts: 88 Location: Pune, India
|
Thanks to all of you. I got the same results in my test.
Another thing that came to my mind..
What if the exception in the Compute node is not a result of throw statement? Its totally unexpected runtime error and is not handled in ESQL? Where will this go? Failure or or nearest Catch? |
|
Back to top |
|
 |
Vitor |
Posted: Wed Feb 25, 2009 9:29 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
There's no difference in implementation between a user-generated exception and a system generated one. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
smdavies99 |
Posted: Wed Feb 25, 2009 9:37 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Quote: |
There's no difference in implementation between a user-generated exception and a system generated one. |
And then it is up to your superbly designed exception handler to sort it all out.
You do have one don't you?  _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
girish_tharwani |
Posted: Wed Feb 25, 2009 8:49 pm Post subject: Throw in Compute |
|
|
 Voyager
Joined: 01 Aug 2001 Posts: 88 Location: Pune, India
|
Yes. I have a foolproof exception handler.. It routes them all to a black hole in outer space  |
|
Back to top |
|
 |
|