ERRORCODE (return error code number)

Top  Previous  Next

 

ERRORCODE( )

The ERRORCODE procedure returns the code number for any error that was posted. If no error was posted, ERRORCODE returns zero. You should interrogate ERRORCODE immediately after the statement that you suspect may post an error because processing any other statement that could post an error will clear the internal error code.

Return Data Type:

LONG

Example:

ADD(Location)              !Add new entry

IF ERRORCODE() = 8         !If not enough memory

MESSAGE('Out of Memory')  !display message

END

 

See Also:

ERROR

ERRORFILE

FILEERROR

FILEERRORCODE

POPERRORS

PUSHERRORS

Trappable Run Time Errors