GetExceptionCodeΒΆ

GetExceptionCode returns the current exception code.

nCode = GetExceptionCode()

Return Value

nCode is the code (number) of an exception. The exception codes are defined in the file uniplot\script\alias.ic (e.g. #define ICERR_INTERRUPT 0xE000002F).

Comment

This function can only be used in try-except blocks (see UniScript User Manual). The try-except blocks must be inside a function.

Example

def Test()
{
    try {
        // Create Exception
        a = 1 + "a";
    } except(GetExceptionCode() == ICERR_OPERATOR_TYPE) {
        MessageBox("Exception ICERR_OPERATOR_TYPE");
    }
}

id-863421