--- parser3/src/include/pa_exception.h 2001/03/19 15:29:37 1.10 +++ parser3/src/include/pa_exception.h 2001/10/11 14:57:53 1.14 @@ -1,19 +1,28 @@ /** @file - Parser + Parser: exception decls. + Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) Author: Alexander Petrosyan (http://design.ru/paf) - $Id: pa_exception.h,v 1.10 2001/03/19 15:29:37 paf Exp $ + $Id: pa_exception.h,v 1.14 2001/10/11 14:57:53 parser Exp $ */ #ifndef PA_EXCEPTION_H #define PA_EXCEPTION_H -#include - +#include "pa_config_includes.h" #include "pa_types.h" #include "pa_string.h" +#ifdef XML +#include +#include +#include +#include +#endif + +class Pool; + /// Just simple longjump mechanizm dressed in class clothes. use Temp_exception class Exception { public: @@ -32,6 +41,19 @@ public: const String *aproblem_source, const char *comment_fmt, ...) const; +#ifdef XML + /// converts XSL exception to parser exception + void _throw(Pool& pool, const String *source, const XSLException& e); + /// converts SAX exception to parser exception + void _throw(Pool& pool, const String *source, const SAXException& e); + /// converts SAX parse exception to parser exception + void _throw(Pool& pool, const String *source, const SAXParseException& e); + /// converts XML exception to parser exception + void _throw(Pool& pool, const String *source, const XMLException& e); + /// converts Xalan DOM exception to parser exception + void _throw(Pool& pool, const String *source, const XalanDOMException& e); +#endif + /// extracts exception type const String *type() const { return ftype; } /// extracts exception code