Exceptions checking
Bart Pietercil
bart.pietercil at cognosis.be
Fri Sep 12 04:07:50 CDT 2008
Hi List, Ruslan
while looking and playing with the exceptions some questions remain:
1) Can I use the <description> in Stored Procedures instead of the
numbers (much clearer) as they are defined in the sql_errors.xml and
kernel_errors.xml.
2) Do I understand correctly that both files are used in exception
checking ?
If yes then why are there 2 files instead of 1 with all the exceptions ?
3) Do I understand correctly that we can edit the <GROUP name="User-
defined errors"> in order to raise our own exceptions (as long as we
stay in the predefined range)
Maybe as a feature request there could be a third file named
user_defined_errors.xml that would need to have the same structure as
the other two.
Difference would be that Paradigma can while updating replace the two
'standard' files without overwriting the user_defined_errors.xml.
4) Do I understand correctly that in order to be used these files HAVE
to reside in the vresources directory.
5) Can a stored procedure return the <message> and <comments> xml
nodes to the calling client ?
If YES how ?
If NO we will return the error to the calling client (in our case php)
a) can we do this like this:
EXCEPTION
WHEN ERR_CONSTRAINT_UNIQUE_VIOLATION THEN
return ERR_CONSTRAINT_UNIQUE_VIOLATION
END;
and will this then return the <sqlstate name= *****> number ?
b) later but first I need an answer on these questions
tia
Bart
More information about the Valentina
mailing list