|
|
| version 1.38.2.15.2.2, 2003/03/19 12:22:35 | version 1.47, 2007/04/24 08:39:28 |
|---|---|
| Line 1 | Line 1 |
| /** @file | /** @file |
| Parser: exception decls. | Parser: exception decls. |
| Copyright (c) 2001-2003 ArtLebedev Group (http://www.artlebedev.com) | Copyright (c) 2001-2005 ArtLebedev Group (http://www.artlebedev.com) |
| Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru) | Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru) |
| */ | */ |
| #ifndef PA_EXCEPTION_H | #ifndef PA_EXCEPTION_H |
| #define PA_EXCEPTION_H | #define PA_EXCEPTION_H |
| static const char* IDENT_EXCEPTION_H="$Date$"; | static const char * const IDENT_EXCEPTION_H="$Date$"; |
| const char* const PARSER_RUNTIME = "parser.runtime"; | |
| // includes | // includes |
| Line 23 class String; | Line 25 class String; |
| class Exception { | class Exception { |
| public: | public: |
| static const char* undefined_type; | |
| static const String* undefined_source; | |
| Exception(); | Exception(); |
| Exception( | Exception( |
| const char* atype, | const char* atype, |
| const String* aproblem_source, | const String* aproblem_source, |
| const char* comment_fmt, ...); | const char* comment_fmt, ...); |
| Exception(const Exception& src); | Exception(const Exception& src); |
| operator bool() { return ftype || fproblem_source || fcomment; } | |
| Exception& operator =(const Exception& src); | Exception& operator =(const Exception& src); |
| #ifdef XML | |
| Exception( | |
| const String* aproblem_source, | |
| GdomeException& exc); | |
| #endif | |
| /// extracts exception type | /// extracts exception type |
| const char* type(bool can_be_empty=false) const { | const char* type(bool can_be_empty=false) const { |
| if(can_be_empty) | if(can_be_empty) |
| Line 58 public: | Line 52 public: |
| return result?result:"<no comment>"; | return result?result:"<no comment>"; |
| } | } |
| private: | protected: |
| const char* ftype; | const char* ftype; |
| const String* fproblem_source; | const String* fproblem_source; |
| const char* fcomment; | char* fcomment; |
| }; | }; |