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.v2r1.bpxbd00/letraceback.htm?lang=en


In article <03d401d03674$10b50770$321f1650$@mcn.org> 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:IBM-MAIN@LISTSERV.UA.EDU] On
> Behalf Of Bernd Oppolzer
> Sent: Thursday, January 22, 2015 10:28 AM
> To: IBM-MAIN@LISTSERV.UA.EDU
> 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
sas...@sas.com           (919) 531-5637                Cary, NC 27513

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to