On Dec 7, 2004, at 6:00 AM, Reinhard Pagitsch wrote:
Thank you, it seems to me at a good error handling. Not in all cases, because sometimes, if an error occure, i want to continue the file parsing but having also a _error_ message back from my XSub, to know there was something wrong in the structure of the file. I changed my XSubs and methods in this way.
An other question: if I do a croak() on error what is the return code of the XSub?
nothing --- functions that croak() or die() do not return. eval() and croak() are implemented with setjmp() and longjmp(), so control immediately jumps from the croak() statement to the next statement after enclosing eval().
therefore you must clean up any malloc'd memory or other resources before croaking, or they will leak.
-- "it's hard to be eventful when you have this much style." - me, rationalizing yet another night of sitting at home.