--- parser3/src/include/pa_exception.h 2003/11/06 08:22:48 1.40 +++ parser3/src/include/pa_exception.h 2007/08/20 10:36:02 1.49 @@ -1,23 +1,32 @@ /** @file 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 (http://paf.design.ru) */ #ifndef PA_EXCEPTION_H #define PA_EXCEPTION_H -static const char* IDENT_EXCEPTION_H="$Date: 2003/11/06 08:22:48 $"; +static const char * const IDENT_EXCEPTION_H="$Date: 2007/08/20 10:36:02 $"; + +const char* const PARSER_RUNTIME = "parser.runtime"; + +const char* const NAME_MUST_BE_STRING = "name must be string"; +const char* const FILE_NAME_MUST_BE_STRING = "file name must be string"; +const char* const NAMESPACEURI_MUST_BE_STRING = "namespaceURI must be string"; +const char* const DATA_MUST_BE_STRING = "data must be string"; +const char* const LOCALNAME_MUST_BE_STRING = "localName must be string"; +const char* const VALUE_MUST_BE_STRING = "value must be string"; +const char* const PARAMETER_MUST_BE_STRING = "parameter must be string"; + +const char* const FILE_NAME_MUST_NOT_BE_CODE = "file name must not be code"; +const char* const COORDINATES_MUST_NOT_BE_CODE = "coordinates must not be code"; // includes #include "pa_memory.h" -#ifdef XML -# include "gdome.h" -#endif - // forwards class String; @@ -33,14 +42,9 @@ public: const String* aproblem_source, const char* comment_fmt, ...); Exception(const Exception& src); + operator bool() { return ftype || fproblem_source || fcomment; } Exception& operator =(const Exception& src); -#ifdef XML - Exception( - const String* aproblem_source, - GdomeException& exc); -#endif - /// extracts exception type const char* type(bool can_be_empty=false) const { if(can_be_empty)