API Tutorial Lesson 13 - Adding Custom Errors to Methods
Although it is not compulsory to add custom error codes to methods, this lesson's sample code depicts this process: new error codes need to be defined first by calling the 'ErrorAddAllow' and 'ErrorAddCommit' APIs (which will include the custom error as a new value for type errorcode ).
Once the error code has been defined, it needs to be associated with the desired method by calling the 'MethodErrorAddAllow' and 'MethodErrorAddCommit' APIs. This way, a single custom error code can be associated with various different methods.
The 'SolutionErrorValid' API can be used to verify if a specific error code is already associated with a specific method of a solution.
US Patent Requested