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

Improve error messaging/exceptions [CORE1852] #2281

Closed
firebird-automations opened this issue Apr 21, 2008 · 15 comments
Closed

Improve error messaging/exceptions [CORE1852] #2281

firebird-automations opened this issue Apr 21, 2008 · 15 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @livius2

Is related to CORE736
Is related to CORE832

Votes: 5

add possibility to create exception definition for table

simple example
1. create exception 'Exception Name' on 'TableName'(FieldName, FieldName2) message 'Field % have wrong value for recordID %"

and use in eg. check constraint :
create exception EPriceMustBePositve on Costs('Price', 'ID') message 'Field % must be greater then 0 for recordID %"
alter table costs add Constraint CK_XXXXXX Check(Price>0.0) exception EPriceMustBePositve

2. more extended
create exception 'Exception name' on 'TableName'(FieldName, value 'FieldName', 'FieldName2') message 'Field % wrong value % for record ID"

and use in eg. check constraint :
create exception EPriceMustBePositve on Costs('Price', value 'Price', 'ID') message 'Field % must be greater then 0 current is: % for recordID %"
alter table costs add Constraint CK_XXXXXX Check(Price>0.0) exception EPriceMustBePositve

@firebird-automations
Copy link
Collaborator Author

Modified by: @livius2

description: add possibility to create exception definition for table

simple example
1. create exception 'Exception Name' on 'TableName'(FieldName, FieldName2) message 'Field % have wrong value for recordID %"

and use in eg. check constraint :
create exception EPriceMustBePositve on Costs('Price', 'ID') message 'Field % must be greater then 0 for recordID %"
Create Constraint CK_XXXXXX Check(Price>0.0) exception 'Exception Name'

1. more extended
create exception 'Exception name' on 'TableName'(FieldName, value 'FieldName', 'FieldName2') message 'Field % wrong value % for record ID"

and use in eg. check constraint :
create exception EPriceMustBePositve on Costs('Price', value 'Price', 'ID') message 'Field % must be greater then 0 current is: % for recordID %"
Create Constraint CK_XXXXXX Check(Price>0.0) exception 'Exception Name'

=>

add possibility to create exception definition for table

simple example
1. create exception 'Exception Name' on 'TableName'(FieldName, FieldName2) message 'Field % have wrong value for recordID %"

and use in eg. check constraint :
create exception EPriceMustBePositve on Costs('Price', 'ID') message 'Field % must be greater then 0 for recordID %"
Create Constraint CK_XXXXXX Check(Price>0.0) exception EPriceMustBePositve

2. more extended
create exception 'Exception name' on 'TableName'(FieldName, value 'FieldName', 'FieldName2') message 'Field % wrong value % for record ID"

and use in eg. check constraint :
create exception EPriceMustBePositve on Costs('Price', value 'Price', 'ID') message 'Field % must be greater then 0 current is: % for recordID %"
Create Constraint CK_XXXXXX Check(Price>0.0) exception EPriceMustBePositve

@firebird-automations
Copy link
Collaborator Author

Modified by: @livius2

description: add possibility to create exception definition for table

simple example
1. create exception 'Exception Name' on 'TableName'(FieldName, FieldName2) message 'Field % have wrong value for recordID %"

and use in eg. check constraint :
create exception EPriceMustBePositve on Costs('Price', 'ID') message 'Field % must be greater then 0 for recordID %"
Create Constraint CK_XXXXXX Check(Price>0.0) exception EPriceMustBePositve

2. more extended
create exception 'Exception name' on 'TableName'(FieldName, value 'FieldName', 'FieldName2') message 'Field % wrong value % for record ID"

and use in eg. check constraint :
create exception EPriceMustBePositve on Costs('Price', value 'Price', 'ID') message 'Field % must be greater then 0 current is: % for recordID %"
Create Constraint CK_XXXXXX Check(Price>0.0) exception EPriceMustBePositve

=>

add possibility to create exception definition for table

simple example
1. create exception 'Exception Name' on 'TableName'(FieldName, FieldName2) message 'Field % have wrong value for recordID %"

and use in eg. check constraint :
create exception EPriceMustBePositve on Costs('Price', 'ID') message 'Field % must be greater then 0 for recordID %"
alter table costs add Constraint CK_XXXXXX Check(Price>0.0) exception EPriceMustBePositve

2. more extended
create exception 'Exception name' on 'TableName'(FieldName, value 'FieldName', 'FieldName2') message 'Field % wrong value % for record ID"

and use in eg. check constraint :
create exception EPriceMustBePositve on Costs('Price', value 'Price', 'ID') message 'Field % must be greater then 0 current is: % for recordID %"
alter table costs add Constraint CK_XXXXXX Check(Price>0.0) exception EPriceMustBePositve

@firebird-automations
Copy link
Collaborator Author

Commented by: @asfernandes

Usage of custom exceptions for constraints (primary, unique, foreign and check) is in my plan for next versions.

@firebird-automations
Copy link
Collaborator Author

Commented by: @livius2

this is greate news for me :)
i will be "first" who test this :)

@firebird-automations
Copy link
Collaborator Author

Commented by: @livius2

I change only priority of this raport without any changing

@firebird-automations
Copy link
Collaborator Author

Modified by: @livius2

priority: Major [ 3 ] => Minor [ 4 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Link: This issue is related to CORE736 [ CORE736 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Version: 3.0 Alpha 1 [ 10331 ]

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Fix Version: 3.0 Alpha 1 [ 10331 ]

Version: 3.0 Alpha 1 [ 10331 ] =>

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

Link: This issue is related to CORE832 [ CORE832 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @asfernandes

CORE736 and CORE832 supercedes this one.

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

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

resolution: Duplicate [ 3 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

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

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Fix Version: 3.0 Alpha 1 [ 10331 ] =>

@firebird-automations
Copy link
Collaborator Author

Commented by: Arioch (arioch)

> CORE736 and CORE832 supercedes this one

and the ticket got closed

but how can those ever be superceding it ?

CORE832 does not touch constraint at all - it only touches Procedural SQL, AFAICT

CORE736 only touches FK-constraints and does not touch CHECK-constraints, which are the topic here

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