Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Brent Boghosian — — source: Informix-list mailing list archive (1991-1998)
Using: INFORMIX-Universal Server Version 9.01.UC2
Problem: Assume SPL as follows ...
CREATE PROCEDURE proc_name( )
DEFINE error_num INT; DEFINE isam_err INT;
DEFINE error_msg VARCHAR( 255 );
DEFINE fcn_return INT;
BEGIN
ON EXCEPTION
SET error_num, isam_err, error_msg
END EXCEPTION WITH RESUME;
LET fcn_return = fcn_name( );
END
IF error_num = -937 THEN -- fcn_name() called mi_db_error_raise()
BEGIN
-- Somehow determine SQLSTATE
-- the actual exception raised by fcn_name()
END
END IF;
END PROCEDURE;
Is it possible to determine the SQLSTATE as indicated in the SPL above?
It should contain the actual exception thrown by fcn_name(), which
is assumed to internally call mi_db_error_raise().
TIA
---
Brent Boghosian MKS Inc.
Software Engineer (519)883-3271
brentb@mks.com http://www.mks.com
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.