--- parser3/src/main/pa_pool.C 2001/01/30 11:51:07 1.4 +++ parser3/src/main/pa_pool.C 2001/02/22 11:08:25 1.9 @@ -1,33 +1,15 @@ /* - $Id: pa_pool.C,v 1.4 2001/01/30 11:51:07 paf Exp $ + $Id: pa_pool.C,v 1.9 2001/02/22 11:08:25 paf Exp $ */ -#include +#include #include "pa_pool.h" +#include "pa_exception.h" -Pool::Pool() : - fglobal_exception(0), - flocal_exception(0) { -} - -Pool::~Pool() { -} - -Exception *Pool::set_global_exception(Exception *e) { - Exception *r=fglobal_exception; - fglobal_exception=e; - return r; -} -void Pool::restore_global_exception(Exception *e) { - fglobal_exception=e; -} - -Exception *Pool::set_local_exception(Exception *e) { - Exception *r=flocal_exception; - flocal_exception=e; - return r; -} -void Pool::restore_local_exception(Exception *e) { - flocal_exception=e; +void Pool::fail(size_t size) const { + // TODO: if(!fexception) die("Pool::fail with no exception set") + fexception->_throw(0, 0, + 0, + "failed to allocate %u bytes", size); }