I have an application with an embedded perl interpreter. Everything works great, except when a perl function chooses to 'die', the death message doesn't make its way back to the C code.
After calling eval_pv, SvTRUE(ERRSV) is true (an error occurred), but SvPV(ERRSV,len) returns a lengthy message about various evals failing, which does not include the message passed to die in the perl code.
For any particular 'die' I could simply return some sort of error code to the C program which could then take appropriate action -- I would prefer a generic mechanism for trapping die and handling the message from C.
Any tips? (I'd like to trap 'warn' as well, but that's less important.)
I'm using perl 5.6.1 from ActiveState with the regular perlembed.
Many thanks,
Yggy
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.