Subject | External Files Query |
---|---|
Author | mahendra.nepali@iflexsolutions.com |
Post date | 2005-10-29T05:21:51Z |
Hi,
I am trying to log unhandled exceptions in firebird. My app calls a
series of firebird procedures one after the other. If an error occurs in
one proc then I want it to log that exception in a table containing some
business related information and at the application level the exception
should be received. I tried creating a test procedure for this. The
following is the code.
CREATE PROCEDURE SP_UPDSVC_EXCEPTIONS
AS
DECLARE VARIABLE I NUMERIC(3) = 120;
DECLARE VARIABLE J NUMERIC(3) = 0;
DECLARE VARIABLE K VARCHAR(5)='';
BEGIN
K= '#' || CAST(I AS VARCHAR(3)) || '#';
IF (J = 0) THEN
I=I/J;
WHEN ANY DO
BEGIN
EXECUTE PROCEDURE SP_LOG_DATA_UPATE_EXCPETION
('TEST',1,'FF12345678901','SC','159',NULL,SQLCODE,GDSCODE);
EXCEPTION MYEXCEPTION1 + K;
END
END
In this I tried to log the exception and then rethrow a exception so
that the App doesn't continue to call the subsequent procedures. However
nothing gets logged in the exception table. If I comment out EXCEPTION
MYEXCEPTION1 + K; Statement then I don't receive any exception in the
app. For which I need to query the exception log table after every proc
is executed.
Have any ideas for this, Please let me know.
Regards,
Mahendra Nepali
Desk: +91-22-5642-7140
Mobile: +919820191887
Email: mahendra.nepali@...
DISCLAIMER:
This message contains privileged and confidential information and is intended only for the individual named.If you are not the intended recipient you should not disseminate,distribute,store,print, copy or deliver this message.Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted,corrupted,lost,destroyed,arrive late or incomplete or contain viruses.The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version.
[Non-text portions of this message have been removed]
I am trying to log unhandled exceptions in firebird. My app calls a
series of firebird procedures one after the other. If an error occurs in
one proc then I want it to log that exception in a table containing some
business related information and at the application level the exception
should be received. I tried creating a test procedure for this. The
following is the code.
CREATE PROCEDURE SP_UPDSVC_EXCEPTIONS
AS
DECLARE VARIABLE I NUMERIC(3) = 120;
DECLARE VARIABLE J NUMERIC(3) = 0;
DECLARE VARIABLE K VARCHAR(5)='';
BEGIN
K= '#' || CAST(I AS VARCHAR(3)) || '#';
IF (J = 0) THEN
I=I/J;
WHEN ANY DO
BEGIN
EXECUTE PROCEDURE SP_LOG_DATA_UPATE_EXCPETION
('TEST',1,'FF12345678901','SC','159',NULL,SQLCODE,GDSCODE);
EXCEPTION MYEXCEPTION1 + K;
END
END
In this I tried to log the exception and then rethrow a exception so
that the App doesn't continue to call the subsequent procedures. However
nothing gets logged in the exception table. If I comment out EXCEPTION
MYEXCEPTION1 + K; Statement then I don't receive any exception in the
app. For which I need to query the exception log table after every proc
is executed.
Have any ideas for this, Please let me know.
Regards,
Mahendra Nepali
Desk: +91-22-5642-7140
Mobile: +919820191887
Email: mahendra.nepali@...
DISCLAIMER:
This message contains privileged and confidential information and is intended only for the individual named.If you are not the intended recipient you should not disseminate,distribute,store,print, copy or deliver this message.Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted,corrupted,lost,destroyed,arrive late or incomplete or contain viruses.The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version.
[Non-text portions of this message have been removed]