Hi,
I have spotted a strange, but not impossible, scenario in a job sequence that has a user defined exception handler.
When an exception occurs in a job sequence, the code under exception handler gets executed. But the interesting thing to know is what happens when the code under that ex handler encounters another exception...? The sequence gets aborted irrespective of Terminator stage usage in ex handle.
Any one has an idea to prevent the sequence from aborting when such scenario occurs?
Exception in Exception handle
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Hi Ray,
If it is something that I can control, that would have been my first choice. To give more details, there is a job that is being called under ex handle stream. If that job is not in runnable state or if one of its parameters can't be set, that results in exception under the ex handle stream. Logically the same reason would have raised the first exception as the same job would have been part of main stream too.
In my case, there is a parameter that needs to be generated before it is passed to a job and if it can't be generated, that would raise exceptions wherever it is expected including ex handler.
Thus I didn't see any way out here to prevent abortion. So thought of giving a try with rest of the world.
If it is something that I can control, that would have been my first choice. To give more details, there is a job that is being called under ex handle stream. If that job is not in runnable state or if one of its parameters can't be set, that results in exception under the ex handle stream. Logically the same reason would have raised the first exception as the same job would have been part of main stream too.
In my case, there is a parameter that needs to be generated before it is passed to a job and if it can't be generated, that would raise exceptions wherever it is expected including ex handler.
Thus I didn't see any way out here to prevent abortion. So thought of giving a try with rest of the world.
There is probably two things happening here. Did you check automatically handle exceptions in job properties? This will force aborts on jobs aborting. Did you check the job restartability? This will skip successful steps when rerunning. This means the step where you calculated the job parameter value may get skipped when rerunning.
Mamu Kim
The product is designed that way to keep an infinite loop from occurring when the exception handler code generates an exception.
As said earlier, that's why you make very sure the exception handler code is minimal and very clean. I typically don't run ANY jobs in my exception handlers. I just send email and stop.
As said earlier, that's why you make very sure the exception handler code is minimal and very clean. I typically don't run ANY jobs in my exception handlers. I just send email and stop.