SPL exception for success?
Posted in 1999
Topics: Stored Procedures & SPL, Error Codes & Troubleshooting, Jobs, Consulting & Announcements
I have a SPL routine that is giving the following exception for success.
The command is (with definition):
DEFINE bXtractSuccess BOOLEAN;
Let bXtractSuccess = 'T'::BOOLEAN;
The trace output is:
expression:"T"::boolean
evaluates to t
let bxtractsuccess = t
exception : looking for handler
SQL error = 0 ISAM error = 0 error string = = ""exception : handler FOUND
This is causing me extreme headaches.
I have had to insert an On Exception as follows:
ON EXCEPTION IN (0)
END EXCEPTION WITH RESUME;
Resuming doesn't seem to occur at the line subsequent to the above 'Let'.
I figure this is one of two problems.
1) I should not be getting a successful exception.
2) It could be a scoping problem with regards to 'begin work/commit/rollback'.
Any ideas?
Jim Riffe wrote:
>
> I have a SPL routine that is giving the following exception for success.
> The command is (with definition):
>
> DEFINE bXtractSuccess BOOLEAN;
>
> Let bXtractSuccess = 'T'::BOOLEAN;
>
> The trace output is:
>
> expression:"T"::boolean
> evaluates to t
> let bxtractsuccess = t
> exception : looking for handler
> SQL error = 0 ISAM error = 0 error string = = ""> exception : handler FOUND
>
> This is causing me extreme headaches.
>
> I have had to insert an On Exception as follows:
>
> ON EXCEPTION IN (0)
> END EXCEPTION WITH RESUME;
Why would you want to handle success as an exception?
Especially with a null handler block.
What was the thinking that led you to such an, how shall we say it
kindly, eccentric decision?
Remove the exception handling for no error.
> Resuming doesn't seem to occur at the line subsequent to the
> above 'Let'.
>
> I figure this is one of two problems.
>
> 1) I should not be getting a successful exception.
> 2) It could be a scoping problem with regards to 'begin work/commit/rollback'.
>
> Any ideas?
--
Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net)
Guardian of DBD::Informix v0.60 -- see http://www.perl.com/CPAN
#include <disclaimer.h>