|
|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: E T
Length: 711 (0x2c7)
Types: TextFile
Names: »EH.cc«
└─⟦a05ed705a⟧ Bits:30007078 DKUUG GNU 2/12/89
└─⟦cc8755de2⟧ »./libg++-1.36.1.tar.Z«
└─⟦23757c458⟧
└─⟦this⟧ »libg++/src/EH.cc«
/* Library code for programs which use -fhandle-exceptions.
Note: do *not* compile this with -fhandle-exceptions. */
#include <setjmp.h>
#include <stream.h>
struct
ExceptionHandler
{
ExceptionHandler *prev;
jmp_buf handler;
void *name;
void *parameters;
ExceptionHandler ();
~ExceptionHandler ();
} EHS, *exceptionHandlerStack = &EHS;
ExceptionHandler::ExceptionHandler ()
{
if (this == &EHS)
{
if (setjmp (EHS.handler))
{
cerr << ("unhandled exception, aborting...\n");
abort ();
}
}
else
{
this->prev = exceptionHandlerStack;
exceptionHandlerStack = this;
}
}
ExceptionHandler::~ExceptionHandler ()
{
exceptionHandlerStack = this->prev;
}