Annotation of parser3/src/include/pa_exception.h, revision 1.19

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.7       paf         5:        Author: Alexander Petrosyan <paf@design.ru> (http://design.ru/paf)
1.6       paf         6: 
1.19    ! paf         7:        $Id: pa_exception.h,v 1.18 2001/10/22 16:44:42 parser Exp $
1.1       paf         8: */
                      9: 
                     10: #ifndef PA_EXCEPTION_H
                     11: #define PA_EXCEPTION_H
                     12: 
1.12      parser     13: #include "pa_config_includes.h"
1.1       paf        14: #include "pa_types.h"
                     15: #include "pa_string.h"
                     16: 
1.14      parser     17: #ifdef XML
                     18: #include <PlatformSupport/XSLException.hpp>
                     19: #include <sax/SAXException.hpp>
                     20: #include <sax/SAXParseException.hpp>
                     21: #include <util/XMLException.hpp>
                     22: #endif
                     23: 
                     24: class Pool;
                     25: 
1.10      paf        26: /// Just simple longjump mechanizm dressed in class clothes. use Temp_exception
1.1       paf        27: class Exception {
                     28: public:
                     29: 
1.19    ! paf        30:        Exception();
1.15      parser     31:        Exception(
1.1       paf        32:                const String *atype, const String *acode,
                     33:                const String *aproblem_source, 
1.15      parser     34:                const char *comment_fmt, ...);
1.14      parser     35: 
                     36: #ifdef XML
                     37:        /// converts XSL exception to parser exception
1.18      parser     38:        static void provide_source(Pool& pool, const String *source, const XSLException& e);
1.14      parser     39:        /// converts SAX exception to parser exception
1.18      parser     40:        static void provide_source(Pool& pool, const String *source, const SAXException& e);
1.14      parser     41:        /// converts SAX parse exception to parser exception
1.18      parser     42:        static void provide_source(Pool& pool, const String *source, const SAXParseException& e);
1.14      parser     43:        /// converts XML exception to parser exception
1.18      parser     44:        static void provide_source(Pool& pool, const String *source, const XMLException& e);
1.14      parser     45:        /// converts Xalan DOM exception to parser exception
1.18      parser     46:        static void provide_source(Pool& pool, const String *source, const XalanDOMException& e);
1.14      parser     47: #endif
1.1       paf        48: 
1.10      paf        49:        /// extracts exception type
1.5       paf        50:        const String *type() const { return ftype; }
1.10      paf        51:        /// extracts exception code
1.5       paf        52:        const String *code() const { return fcode; }
1.10      paf        53:        /// extracts exception problem_source
1.5       paf        54:        const String *problem_source() const { return fproblem_source; }
1.10      paf        55:        /// extracts exception comment
1.17      parser     56:        const char *comment() const { return fcomment; }
1.1       paf        57: 
                     58: private:
                     59: 
1.15      parser     60:        const String *ftype, *fcode, *fproblem_source;
1.17      parser     61:        char *fcomment;
1.15      parser     62: 
1.1       paf        63: };
                     64: 
                     65: #endif

E-mail: