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"?>
<MsgFileLanguage="en"><MsgDomainDomain="UserErrors"><MessageId="-111"Name="MyError">An error has occured</Message>
<MessageId="-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.
setx=##class(%Messag

.png)
.png)
.png)
.png)
.png)
