GetExceptionInfoΒΆ

GetExceptionInfo returns the current exception information vector.

svInfo = GetExceptionInfo()

Return Value

svInfo is a string vector with 5 elements:

Value Description
svInfo[1] Exception-Code
svInfo[2] Line number
svInfo[3] File name
svInfo[4] Exception-String (Error message)
svInfo[5] Line with the source code if available

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
        error("!Sample");
    } except(1) {
        svInfo = GetExceptionInfo();
        print svInfo;
    }
}

id-1918464