An ErrorMessageException is thrown to indicate that a received message is (presumably) not the expected type of message, but an error message instead. That way, the java Exceptions mechanism can be used to isolate exception processing in a SIRA_PRISE client for exceptions signaled by a SIRA_PRISE server, instead of having to code 'instanceof ErrorMessageType' in each and every client. The getMessage() method of this Exception will return a string structured as
'errortype:errornum:errortext', in which errortext is the original error message sent out by the server, and errortype:errornum can be as follows :
Error message types
Errortype |
Errortype description |
Meaning of ErrorNum |
201806116 |
Error indicates a constraint violation |
The numeric Id of the constraint that was violated |
858993459 |
Error indicates a runtime error |
none, value always -1 |
1497858657 |
Error indicates a SIRA_PRISE runtime error |
The numeric Id of the runtime error |