Skip to content
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

Closed
firebird-automations opened this issue Jun 28, 2006 · 13 comments
Closed

Add support for parametrised exceptions [CORE832] #1220

firebird-automations opened this issue Jun 28, 2006 · 13 comments

Comments

@firebird-automations
Copy link
Collaborator

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.

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

assignee: Dmitry Yemanov [ dimitr ] =>

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Workflow: jira [ 11043 ] => Firebird [ 14361 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

Link: This issue is duplicated by CORE2620 [ CORE2620 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: arni (arni)

SDF FORMAT would be solution in this case and be useful in general.
For what need syntax complicating?

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Link: This issue is related to CORE1314 [ CORE1314 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @asfernandes

Documented in doc/sql.extensions/README.exception_handling.

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 3.0 Alpha 1 [ 10331 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

Link: This issue relate to CORE1852 [ CORE1852 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

Link: This issue relate to CORE736 [ CORE736 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Link: This issue is related to QA504 [ QA504 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

QA Status: No test

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Resolved [ 5 ]

QA Status: No test => Covered by another test(s)

Test Details: See tests for core4160 & core-4811.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants