octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

more on exceptions; new handler


From: John W. Eaton
Subject: more on exceptions; new handler
Date: Thu, 14 Nov 2002 21:50:50 -0600

Currently, I've defined macros in libcruft/misc/quit.h so that our new
interrupt handling scheme can work with or without exceptions.  But
does this really make sense?  Should we just start using exceptions?

Another change related to exceptions is to do away with the
new_handler that is defined in src/sighandlers.cc (even though it is
not really a signal handler, that's where it is defined).

Instead, we could add a

  catch (bad_alloc) { ... }

block to the main loop in src/toplev.cc so that any bad allocation
ends up back at the top.  Now, does this mean that we will have to
have the same kind of nesting for bad_alloc around foreign code to
protect us if that code is not compiled with exceptions enabled?  It
seems that the answer to that should be yes (and that's what a quick
test just showed).

jwe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]