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
Add support for parametrised exceptions [CORE832] #1220
Comments
Modified by: @pcisarassignee: Dmitry Yemanov [ dimitr ] => |
Modified by: @asfernandesassignee: Adriano dos Santos Fernandes [ asfernandes ] |
Modified by: @pcisarWorkflow: jira [ 11043 ] => Firebird [ 14361 ] |
Modified by: @asfernandes |
Commented by: arni (arni) SDF FORMAT would be solution in this case and be useful in general. |
Commented by: @asfernandes Documented in doc/sql.extensions/README.exception_handling. |
Modified by: @asfernandesstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 3.0 Alpha 1 [ 10331 ] |
Modified by: @asfernandes |
Modified by: @asfernandes |
Modified by: @pavel-zotovQA Status: No test |
Modified by: @pavel-zotovstatus: Resolved [ 5 ] => Resolved [ 5 ] QA Status: No test => Covered by another test(s) Test Details: See tests for core4160 & core-4811. |
Submitted by: Ain Valtin (ain)
Is duplicated by CORE2620
Is related to CORE1314
Relate to CORE1852
Relate to CORE736
Is related to QA504
Votes: 6
Allow to create exception messages where some part(s) are replaced when exception is raised. Something like:
CREATE EXCEPTION EXP_WrongDate 'Date must be between %1 and %2 (%3)';
CREATE TRIGGER ...
ACTIVE BEFORE INSERT POSITION 10
DECLARE DRngB DATE;
DECLARE DRngE DATE;
AS BEGIN
...find value for DRngB and DRngE
if(NOT((DRngB <= NEW.ItmDate)AND(DRngE >= NEW.ItmDate)))THEN
EXCEPTION EXP_WrongDate(DRngB, DRngE, NEW.ItmDate);
END
Exception parameters should be automatically casted to VARCHAR of appropriate length.
Commits: 8d17931 be85998 FirebirdSQL/fbt-repository@0f5d272
====== Test Details ======
See tests for core4160 & core-4811.
The text was updated successfully, but these errors were encountered: