--- parser3/src/include/pa_pool.h 2001/03/10 15:44:30 1.26 +++ parser3/src/include/pa_pool.h 2001/03/13 11:19:30 1.31 @@ -1,5 +1,9 @@ /* - $Id: pa_pool.h,v 1.26 2001/03/10 15:44:30 paf Exp $ + Parser + Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) + Author: Alexander Petrosyan (http://design.ru/paf) + + $Id: pa_pool.h,v 1.31 2001/03/13 11:19:30 paf Exp $ */ #ifndef PA_POOL_H @@ -7,7 +11,6 @@ #include -//class String; class Exception; class Temp_exception; @@ -92,15 +95,15 @@ public: #define NEW new(pool()) class Temp_exception { - Pool pool; + Pool& fpool; Exception *saved_exception; public: Temp_exception(Pool& apool, Exception& exception) : - pool(apool), + fpool(apool), saved_exception(apool.set_exception(&exception)) { } ~Temp_exception() { - pool.restore_exception(saved_exception); + fpool.restore_exception(saved_exception); } }; @@ -112,6 +115,7 @@ public: #define THROW exception()._throw #define POOL_THROW pool.exception()._throw +#define R_THROW r.pool().exception()._throw #define CATCH(e) \ else{ \ Exception& e=temp_exception;