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.
"Andy Kent" — — source: Informix-list mailing list archive (1991-1998)
I'm writing some stored procedures for a client at the moment and am up
against a couple of dilemmas regarding error raisign/ handling.
I want to use the RAISE EXCEPTION feature in such a way that the front
end process (in this case, either Informix-4GL or Gupta SQL Windows)
catches it in the same way it would an Informix-generated error. I am
using numbers -5000 to -5999 for application-generated exceptions (the
ancient File-It! numbers) but I'd also like to be able to pass a
descriptive string back; also the mechanism only seems to be effective if
I *don't* have an "ON EXCEPTION IN (-5000 TO -5999)" clause. The whole
thing seems a bit messy, what with 4GL generating "Unknown message" text
and all that, and I can't seem to get SPL's error string handling
features to have the desired effect of passing a customised string back
to 4gl along with the error number.
The other thing I'd like to be able to do is to raise a customised
NOTFOUND condition if the code inside the procedure doesn't find any rows
meeting the parameters it was called with.
I'm relatively new to these concepts and would appreciate any guidelines,
code samples and suggestions that anyone can offer.
Thanks very much.
akent@cix.compulink.co.uk (Andy Kent)
-------------------------------------
44 272 742815
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.