DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: E T

⟦96659f526⟧ TextFile

    Length: 711 (0x2c7)
    Types: TextFile
    Names: »EH.cc«

Derivation

└─⟦a05ed705a⟧ Bits:30007078 DKUUG GNU 2/12/89
    └─⟦cc8755de2⟧ »./libg++-1.36.1.tar.Z« 
        └─⟦23757c458⟧ 
            └─⟦this⟧ »libg++/src/EH.cc« 

TextFile

/* 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;
}