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

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.34    ! paf         7:        $Id: pa_exception.h,v 1.33.2.1 2002/04/29 05:56:20 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.1       paf        20: class Exception {
                     21: public:
                     22: 
1.19      paf        23:        Exception();
1.15      parser     24:        Exception(
1.33      paf        25:                const char *atype,
1.1       paf        26:                const String *aproblem_source, 
1.15      parser     27:                const char *comment_fmt, ...);
1.22      paf        28:        Exception(const Exception& src);
                     29:        Exception& operator =(const Exception& src);
                     30:        ~Exception();
1.14      parser     31: 
                     32: #ifdef XML
1.28      paf        33:        Exception(
                     34:                const String *aproblem_source, 
                     35:                GdomeException& exc);
1.14      parser     36: #endif
1.1       paf        37: 
1.10      paf        38:        /// extracts exception type
1.33      paf        39:        const char *type() const { return ftype; }
1.10      paf        40:        /// extracts exception problem_source
1.34    ! paf        41:        const String *problem_source() const { 
        !            42:                return fproblem_source && fproblem_source->size()?fproblem_source:0; 
        !            43:        }
1.10      paf        44:        /// extracts exception comment
1.22      paf        45:        const char *comment() const { return fcomment; }
1.1       paf        46: 
                     47: private:
                     48: 
1.33      paf        49:        const char *ftype;
                     50:        const String *fproblem_source;
                     51:        bool owns_comment; char *fcomment;
1.15      parser     52: 
1.1       paf        53: };
                     54: 
                     55: #endif

E-mail: