--- parser3/src/include/Attic/pa_error.h 2001/01/29 20:46:21 1.1 +++ parser3/src/include/Attic/pa_error.h 2001/01/29 21:51:51 1.2 @@ -1,5 +1,5 @@ /* - $Id: pa_error.h,v 1.1 2001/01/29 20:46:21 paf Exp $ + $Id: pa_error.h,v 1.2 2001/01/29 21:51:51 paf Exp $ */ #ifndef PA_ERROR_H @@ -13,9 +13,12 @@ class Error { public: + // address for long jump to jump to + jmp_buf mark; + Error() : valid(false) {} static void die(char *acomment); - bool begin(); + void prepare_begin(); void raise(String *aproblem_source, char *comment_fmt, ...); String *problem_source(); @@ -25,11 +28,10 @@ private: bool valid; - // address for long jump to jump to - jmp_buf mark; - String *fproblem_source; char fcomment[MAX_STRING]; }; +#define ERROR_BEGIN(error) error.prepare_begin(), (setjmp(error.mark)==0) + #endif