GETEXCEPTIONPTRSQQ

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 DFLIB

Syntax

result = GETEXCEPTIONPTRSQQ( )

Results:

The result is of type INTEGER(4) on ia32 processors; INTEGER(8) on ia64 processors. 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 The Floating Point Environment in the Programmer's Guide.

Compatibility

CONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS DLL LIB

See Also: TRACEBACKQQ, GETSTATUSFPQQ, CLEARSTATUSFPQQ, SETCONTROLFPQQ, GETCONTROLFPQQ, SIGNALQQ, MATHERRQQ

Example

   PROGRAM SIGTEST
   USE DFLIB
   ...
   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 DFLIB
   ...
   EPTRS = GETEXCEPTIONPTRSQQ()
   ...
   CALL TRACEBACKQQ("Application SIGFPE error!",USER_EXIT_CODE=-1,EPTR=EPTRS)
   ...
   MY_HANDLER = 1
   END

A complete working example can be found in the online samples.