SQLSTATE vs. SQLCODE, exception handling

Not applicable

SQLSTATE vs. SQLCODE, exception handling

I am trying to develop a standardized error handling mechanism for Teradata stored procedures.
Coming from the Oracle world I am quite underwhelmed by the exception/error handling in Teradata.
The solution I have come up with is essentially to have every stored procedure catch any exception log the error to the database then force a divide by zero exception. If I just exit without forcing an exception, the calling procedure will just continue ...
Has someone devised a better solution? Can I get the text of the original error message from the stored procedure, or are SQLCODE and SQLSTATE my only clues?
Any help would be appreciated!

Re: SQLSTATE vs. SQLCODE, exception handling

Lookup on DBC.ErrorMsgs table to get the description of a error code (SQLCODE) you get.