InterSystems FAQ rubric
To create a user-defined error you need to prepare the XML that describes the error code and corresponding message that you want to use as a user-defined error.
Please set the error code as a negative integer.
<?xml version="1.0" encoding="UTF-8" ?>
<MsgFile Language="en">
<MsgDomain Domain="UserErrors">
<Message Id="-111" Name="MyError">An error has occured</Message>
<Message Id="-222" Name="MyError2">An error has occured 2</Message>
</MsgDomain>
</MsgFile>
Once the XML file is created, load it into the namespace you want to use.
.png)
.png)
.png)
.png)