Annotation of parser3/src/include/pa_exception.h, revision 1.31
1.10 paf 1: /** @file
1.11 paf 2: Parser: exception decls.
3:
1.30 paf 4: Copyright (c) 2001, 2002 ArtLebedev Group (http://www.artlebedev.com)
1.31 ! paf 5: Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru)
1.6 paf 6:
1.31 ! paf 7: $Id: pa_exception.h,v 1.30 2002/02/08 07:27:43 paf Exp $
1.1 paf 8: */
9:
10: #ifndef PA_EXCEPTION_H
11: #define PA_EXCEPTION_H
12:
13: #include "pa_types.h"
14: #include "pa_string.h"
1.14 parser 15:
16: class Pool;
17:
1.22 paf 18: // defines
19:
1.10 paf 20: /// Just simple longjump mechanizm dressed in class clothes. use Temp_exception
1.1 paf 21: class Exception {
22: public:
23:
1.19 paf 24: Exception();
1.15 parser 25: Exception(
1.1 paf 26: const String *atype, const String *acode,
27: const String *aproblem_source,
1.15 parser 28: const char *comment_fmt, ...);
1.22 paf 29: Exception(const Exception& src);
30: Exception& operator =(const Exception& src);
31: ~Exception();
1.14 parser 32:
33: #ifdef XML
1.28 paf 34: Exception(
35: const String *atype, const String *acode,
36: const String *aproblem_source,
37: GdomeException& exc);
1.14 parser 38: #endif
1.1 paf 39:
1.10 paf 40: /// extracts exception type
1.5 paf 41: const String *type() const { return ftype; }
1.10 paf 42: /// extracts exception code
1.5 paf 43: const String *code() const { return fcode; }
1.10 paf 44: /// extracts exception problem_source
1.5 paf 45: const String *problem_source() const { return fproblem_source; }
1.10 paf 46: /// extracts exception comment
1.22 paf 47: const char *comment() const { return fcomment; }
1.1 paf 48:
49: private:
50:
1.15 parser 51: const String *ftype, *fcode, *fproblem_source;
1.22 paf 52: bool owns_comment;
53: char *fcomment;
1.15 parser 54:
1.1 paf 55: };
56:
57: #endif
E-mail: