- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear All,
I implemented an exception handler and registered it with SIGNALQQ. Within this exception handler I want to call TRACEBACKQQ function with EPTR option. Unfortunately GETEXCEPTIONPTRSQQ() function returns NULL. Does anyone of you have an idea why? Thank you for your time in advance.
Best regards,
Baris Irhan,
integer(4) function h_fpe (signum,ecode) !DIR$ ATTRIBUTES C :: h_fpe !params integer(2) :: signum integer(2) :: ecode !variables integer(4) :: RTN_STS integer(KIND=INT_PTR_KIND()) :: EPTRS include 'FOR_IOSDEF.FOR' !body !write(*,'(/,A)') 'in signal handler for sig$fpe' !write(*,*) 'signum = ', signum !write(*,*) 'ecode = ', ecode !read(*,*) EPTRS = GETEXCEPTIONPTRSQQ() call TRACEBACKQQ(USER_EXIT_CODE=-1,STATUS=RTN_STS,EPTR=EPTRS) if (RTN_STS .EQ. FOR$IOS_SUCCESS) then write(*,*) 'TRACEBACK WAS SUCCESSFUL' read(*,*) end if h_fpe = 1 end
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would try adding USE IFCORE to your program so that GetExceptionPtrsQQ is properly defined.
It's possible that the return value is being interpreted as a REAL, being converted to INTEGER before being stored in EPTRS, and weird things are happening.
I hope this helps --
--Lorri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Lorri,
I defined event handler as a module procedure. use IFCORE has already been added at module declaration...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Colleques,
I am still NOT able to figure out why GETEXCEPTIONPTRSQQ function returns NULL when it is called within exception handler. Why I am not able to use this nice feature...

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page