GETEXCEPTIONPTRSQQ (i32, i64em; W*32, W*64)

Run-Time Function: Returns a pointer to C run-time exception information pointers appropriate for use in signal handlers established with SIGNALQQ or direct calls to the C rtl signal( ) routine.

Module: USE IFCORE

Syntax

result = GETEXCEPTIONPTRSQQ( )

Results

The result type is INTEGER(4) on IA-32 architecture; INTEGER(8) on Intel® 64 architecture. The return value is the address of a data structure whose members are pointers to exception information captured by the C runtime at the time of an exception. This result value can then be used as the EPTR argument to routine TRACEBACKQQ to generate a stack trace from a user-defined handler or to inspect the exception context record directly.

Calling GETEXCEPTIONPTRSQQ is only valid within a user-defined handler that was established with SIGNALQQ or a direct call to the C rtl signal( ) function.

For a full description of exceptions and error handling, see Building Applications: The Floating-Point Environment Overview.

Compatibility

CONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS DLL LIB

See Also

TRACEBACKQQ, GETSTATUSFPQQ, CLEARSTATUSFPQQ, SETCONTROLFPQQ, GETCONTROLFPQQ, SIGNALQQ, Building Applications: Using SIGNALQQ

Example

   PROGRAM SIGTEST
   USE IFCORE
   ...
   R3 = 0.0E0
   STS = SIGNALQQ(MY_HANDLER)
   ! Cause a divide by zero exception
   R1 = 3.0E0/R3
   ...
   END

   INTEGER(4) FUNCTION MY_HANDLER(SIGNUM,EXCNUM)
   USE IFCORE
   ...
   EPTRS = GETEXCEPTIONPTRSQQ()
   ...
   CALL TRACEBACKQQ("Application SIGFPE error!",USER_EXIT_CODE=-1,EPTR=EPTRS)
   ...
   MY_HANDLER = 1
   END