Annotation of parser3/src/include/pa_exception.h, revision 1.26
1.10 paf 1: /** @file
1.11 paf 2: Parser: exception decls.
3:
1.6 paf 4: Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com)
1.20 paf 5: Author: Alexander Petrosyan <paf@design.ru> (http://paf.design.ru)
1.6 paf 6:
1.26 ! paf 7: $Id: pa_exception.h,v 1.25 2001/12/28 14:06:51 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"
15:
1.14 parser 16: #ifdef XML
1.24 paf 17: /*
1.14 parser 18: #include <PlatformSupport/XSLException.hpp>
19: #include <sax/SAXException.hpp>
20: #include <sax/SAXParseException.hpp>
21: #include <util/XMLException.hpp>
1.24 paf 22: */
1.14 parser 23: #endif
24:
25: class Pool;
26:
1.22 paf 27: // defines
28:
1.10 paf 29: /// Just simple longjump mechanizm dressed in class clothes. use Temp_exception
1.1 paf 30: class Exception {
31: public:
32:
1.19 paf 33: Exception();
1.15 parser 34: Exception(
1.1 paf 35: const String *atype, const String *acode,
36: const String *aproblem_source,
1.15 parser 37: const char *comment_fmt, ...);
1.25 paf 38: Exception(
39: const String *atype, const String *acode,
40: const String *aproblem_source,
1.26 ! paf 41: const char *comment_fmt, va_list args);
! 42: Exception(
! 43: const String *atype, const String *acode,
! 44: const String *aproblem_source,
1.25 paf 45: GdomeException& exc);
1.22 paf 46: Exception(const Exception& src);
47: Exception& operator =(const Exception& src);
48: ~Exception();
1.14 parser 49:
50: #ifdef XML
1.24 paf 51: /*
1.14 parser 52: /// converts XSL exception to parser exception
1.18 parser 53: static void provide_source(Pool& pool, const String *source, const XSLException& e);
1.14 parser 54: /// converts SAX exception to parser exception
1.18 parser 55: static void provide_source(Pool& pool, const String *source, const SAXException& e);
1.14 parser 56: /// converts SAX parse exception to parser exception
1.18 parser 57: static void provide_source(Pool& pool, const String *source, const SAXParseException& e);
1.14 parser 58: /// converts XML exception to parser exception
1.18 parser 59: static void provide_source(Pool& pool, const String *source, const XMLException& e);
1.14 parser 60: /// converts Xalan DOM exception to parser exception
1.18 parser 61: static void provide_source(Pool& pool, const String *source, const XalanDOMException& e);
1.24 paf 62: */
1.14 parser 63: #endif
1.1 paf 64:
1.10 paf 65: /// extracts exception type
1.5 paf 66: const String *type() const { return ftype; }
1.10 paf 67: /// extracts exception code
1.5 paf 68: const String *code() const { return fcode; }
1.10 paf 69: /// extracts exception problem_source
1.5 paf 70: const String *problem_source() const { return fproblem_source; }
1.10 paf 71: /// extracts exception comment
1.22 paf 72: const char *comment() const { return fcomment; }
1.26 ! paf 73:
! 74: private:
! 75:
! 76: void initialize(const String *atype, const String *acode,
! 77: const String *aproblem_source,
! 78: const char *comment_fmt, va_list args);
1.1 paf 79:
80: private:
81:
1.15 parser 82: const String *ftype, *fcode, *fproblem_source;
1.22 paf 83: bool owns_comment;
84: char *fcomment;
1.15 parser 85:
1.1 paf 86: };
87:
88: #endif
E-mail: