New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow exception name and possibly exception text to be determined within a "WHEN ANY" error handling block [CORE2040] #947
Comments
Modified by: @dyemanovsummary: Allow Excepption Name and possibly exception text to be determined within a "WHEN ANY" error handling block. => Allow exception name and possibly exception text to be determined within a "WHEN ANY" error handling block |
Commented by: Philip Williams (unordained) begin In a case like that, both the name of the exception (e_some_error) and the exact message are important; the message cannot be looked up in system tables, as the one defined for e_some_error is probably simply 'A value could not be inserted into a field because of a rule violation', something generic for documentation purposes. |
Commented by: James Calfee (james_jcalfee.info) Please provide the RDB$EXCEPTION_NUMBER from RDB$EXCEPTIONS too... |
Modified by: @mrotteveel |
Modified by: @pavel-zotovstatus: Open [ 1 ] => Open [ 1 ] QA Status: Covered by another test(s) Test Details: See functional\exception\handling_name_and_message.fbt |
Modified by: @dyemanovFix Version: 4.0 Alpha 1 [ 10731 ] Component: Engine [ 10000 ] assignee: Dmitry Yemanov [ dimitr ] |
Submitted by: Alastair Breingan (alb)
Is duplicated by CORE3254
Relate to CORE2382
Votes: 28
Firebird allows GDSCODE and SQLCODE to be retrieved when handling errors, but not the exception name and text, which will normally be much more common.
This does not allow for a generic error handling routine, which, for example might log the error and re-signal the exception, or for the more user-friendly reporting of all validation errors raised by a trigger (rather than just the first).
Please note that while the text is useful the name is the critical part as the text can always be retrieved from the system tables.
Commits: ebd0d3c
====== Test Details ======
See functional\exception\handling_name_and_message.fbt
The text was updated successfully, but these errors were encountered: