Grumble, grumble. __le_traceback() is AMODE 64 only. (Noticed that after
spending about an hour trying to get the example to compile.)

Charles

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On
Behalf Of Don Poitras
Sent: Thursday, January 22, 2015 11:09 AM
To: [email protected]
Subject: Re: In C++ any way to get traceback info in a catch()?

The CIB is described in __le_api.h. There's a useful function for producing
tracebacks, __le_traceback. The doc has sample code calling it in C.

https://www-304.ibm.com/support/knowledgecenter/SSLTBW_2.1.0/com.ibm.zos.v2r
1.bpxbd00/letraceback.htm?lang=en


In article <[email protected]> you wrote:
> Bernd -

> Thanks much!

> Really. :-)

> Yes, I did not mention it, but when I catch conditions (in a generic 
> sense of the word) in a signal handler then CEE3DMP shows the real error
location.
> You can return from a signal handler so the stack is preserved. It 
> appears the stack is unwound on a catch() -- from which there is no 
> return (to the point of failure).

> That is encouraging news on the CIB -- implies that a CIB may be 
> created on a C++ exception that leads to a catch().

> Is the CIB documented anywhere? All I have found are the leawi.h 
> header and a couple of fields documented in the LE P/G.

> What fields do you find useful? Is there anything close to the line 
> number and function or module name for the error?

> Charles

> -----Original Message-----
> From: IBM Mainframe Discussion List [mailto:[email protected]] 
> On Behalf Of Bernd Oppolzer
> Sent: Thursday, January 22, 2015 10:28 AM
> To: [email protected]
> Subject: Re: In C++ any way to get traceback info in a catch()?

> Am 22.01.2015 um 18:13 schrieb Charles Mills:
> > I am catching a bad_alloc exception in a catch() block. I call 
> > CEE3DMP but the stack has been unwound

> Really?

> If I have a similar situation for example with PL/1, where an 
> exception is caught by a PL/1 ON ERROR UNIT, I get a traceback which looks
like that:

> CEEDUMP  called by
> ON ERROR unit  called by
> some LE error handling stuff  called by the routine getting the 
> exception (with the CIB)  called by
> PL/1 main (for example)  called by
> LE initialization stuff.

> that is, the stack at the time of the ON ERROR unit still contains the 
> routine with the exception. So I have no problem seeing the routine 
> that caused the error.
> I guess: signal handling in C will do the same.

> Is the try/catch logic in C++ that different?

--
Don Poitras - SAS Development  -  SAS Institute Inc. - SAS Campus Drive
[email protected]           (919) 531-5637                Cary, NC 27513

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email
to [email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to