I have been looking into the AIMMS error handling feature. During this, the function errh::Category got my attention. This function has an element parameter with range errh::AllPendingErrors as input, and it returns the error category in the range of the predefined set errh::AllErrorCategories.
The set errh::AllErrorCategories contains these possible categories: Engine, Internal, Authorization, Licensing, Memory, Limit, Compiler, Syntax, Semantics, Legacy, Execution, Math, InvalidArgument, Unit, IO, External, Generation, MathematicalProgramming, NonlinearEvaluation, Solver, GUI and User.
Some examples of how AIMMS classifies errors using the categories are these:
- When assigning a value of 2 to an identifier with a Binary range, the category is Semantics
- Doing a division by zero resulted in a Math error
What I want is to use these categories in order to control the errors that AIMMS displays by default and to show a user-friendly message to the end-user. For instance, when I executed a procedure with a zero division the AIMMS message was "Execution error while evaluating the assignment statement for "lpBinaryRange" on line 13 in user-defined function section "procTestLog".Division by zero error with 1 / 0." but what I want the user to see is "Math error, please contact your development team".
The problem that I have is that I didn´t find a list that relates the categories with the most common errors.
I hope my description is understandable. I would be very thankful for any information or support.
Thanks,
Jorge