Errmes$

errmes$ returns the message associated with a numeric error code available when an error occurs. It is frequently used when the error code errn is used, in the error handling routine set by Onerrgo.

Syntax

 errmes$(INT_EXPR)

Examples

# Example 1 : What does error 10 mean ?Local Char ERROR_10(200)ERROR_10=errmes$(10) : # if connected in English, contains "Incompatibility of Type"# Example 2 : Let's trigger an error (division by zero)Funprog DIV_BY_ZEROLocal Integer ZERO, ONE, RESULTLocal Char ERROR_MESSAGE(250)ONE=1 : ZERO=0Onerrgo ERR_HANDLERESULT = ONE / ZEROEnd ERROR_MESSAGE$ERR_HANDLEERROR_MESSAGE="Error"-num$(errn)-"raised on line"-num$(errl)-"in script"-errp-"Message:"-errmes$(errn)&-"Additional details:"-errmResume

Description

errmess$ returns the description associated with an error code that is assigned when an error occurs on a script. The result type is Char. The message returned depends on the connection language.

As errn only has a significant value in the error handling routine, errmes$ should be primarily used in error handling routines.

In the different script glossary documentations, the Associated errors chapter provides the value of the errors that can occur for each instruction or function. The message can be retrieved by using errmes$ with the given error values, even directly from the calculator.

Associated errors

Error codeDescription
10The argument is not numeric.
50Negative argument.

See also

errl, errp, Onerrgo, errn, errm.