Archives of the TeradataForum
Message Posted: Mon, 25 Oct 2004 @ 17:41:58 GMT
Subj: | | Re: Stored Procedure: Error Raising |
|
From: | | Hough, David A |
Trapping an exception clears all of the related error information, including SQLSTATE. No mechanism is provided for re-raising the error that
put you in the handler. This is a fairly basic requirement of exception handling that was overlooked by NCR.
It may be that the ANSI standard doesn't cover it, but an extension via predefined global variables to hold the error state(s) and a function
call should be possible. The only workaround is to divide by zero inside the handler; at least you can get out of the handler with an error that
way.
BTW, I prefer I/(I-I) as a error statement so the divide by zero won't be detected by the compiler.
/dave hough
|