On Mon, Apr 28, 2008 at 1:53 PM, Allison Randal <[EMAIL PROTECTED]> wrote: > Bob Rogers wrote: > > > > > From: "Klaas-Jan Stol" <[EMAIL PROTECTED]> > > > > > > about the removal of internal_exception: the specified ticket (in the > > list on the wiki) does not have a conclusion: no final decision seems > > to be have made on that issue. What's more, a quick check on a few > > calls to internal_exception revealed that there's no interpreter > > argument available . . . > > > > Yes; that's what the ticket is really about, whether it's worth > > modifying callers in the few cases where it's needed, so the ticket is > > really misnamed. internal_exception itself is still needed for sanity > > checking in cases where exceptions cannot work. > > > > A good example of this is for instance in tsq.c::queue_destroy. (line > > 381) This exception indicates something's wrong with the thread-safe > > queue, which I assume is really really fatal, and should result in > > parrot exiting? > > > > kjs > > > > Yes. These cases should be few (stack corruption, severe GC problems), > > but they cannot be reduced to zero without removing useful sanity > > checks. In some cases, it may be a choice between an internal_exception > > and a (possibly exploitable) jump into random memory. > > > > In any case, convertible calls to internal_exception should already > > have been handled in RT#40392 (though it is possible that other > > inappropriate internal_exception calls may have crept in since then). > > > > There's certainly a need for a way to die cleanly and print out an error > message and possibly a backtrace under extreme circumstances. But that's not > what internal_exception does (even though we're using it that way now). > internal_exception is an early and very poor attempt at an implementation of > exceptions, and carries a load of baggage of nasty code. > > I'll put in a new task: > > - Provide a simple function for completely fatal errors where throwing an > exception isn't possible, and replace last dregs of 'internal_exception' > with it. > > Allison >
so this function should exit then? Maybe it should be called 'exit_fatal', or something at least that marks that parrot will bail out. kjs