#include "pexceptions.h"
#include <iostream.h>

void PFailHandler(void); 

// egcs ne semble pas connaitre set_new_handler (Reza 26/04/99)
#ifdef __GNUG__
void PFailHandler(void) {}
void InitFailNewHandler() {}
#else

void PFailHandler(void)
{
  set_new_handler(NULL);
  cerr << "Allocation exception -- out of memory" << endl;
  throw(AllocationError("new"));
}

void InitFailNewHandler()
{
   set_new_handler(PFailHandler);
}

#endif
