GetTryErrorCode

Syntax:

GetTryErrorCode()

Parameters:


Return Values:

Returns the system error code of the exception.


Description:

Returns the type of exception. Use this function only in the Else part (error handling section).

A list of error codes (not all are supported for every computer):

#EXCEPTION_ACCESS_VIOLATION

#EXCEPTION_ARRAY_BOUNDS_EXCEEDED

#EXCEPTION_BREAKPOINT

#EXCEPTION_DATATYPE_MISALIGNMENT

#EXCEPTION_FLT_DENORMAL_OPERAND

#EXCEPTION_FLT_DIVIDE_BY_ZERO

#EXCEPTION_FLT_INEXACT_RESULT

#EXCEPTION_FLT_INVALID_OPERATION

#EXCEPTION_FLT_OVERFLOW

#EXCEPTION_FLT_STACK_CHECK

#EXCEPTION_FLT_UNDERFLOW

#EXCEPTION_ILLEGAL_INSTRUCTION = $C000001D

#EXCEPTION_IN_PAGE_ERROR

#EXCEPTION_INT_DIVIDE_BY_ZERO

#EXCEPTION_INT_OVERFLOW

#EXCEPTION_INVALID_DISPOSITION = $C0000026

#EXCEPTION_NONCONTINUABLE_EXCEPTION = $C0000025

#EXCEPTION_NONCONTINUABLE_EXCEPTION

#EXCEPTION_PRIV_INSTRUCTION

#EXCEPTION_SINGLE_STEP

#EXCEPTION_STACK_OVERFLOW = $C00000FD


Example:

If TryError()
  a = a / 0
Else
  MessageRequester(Hex(GetTryErrorCode()), Hex(#EXCEPTION_INT_DIVIDE_BY_ZERO))
EndIf : EndTryError()

Remarks:

tested with 2k/XP



Supported OS:   Windows