--- parser3/src/include/pa_exception.h 2001/05/17 10:22:24 1.12 +++ parser3/src/include/pa_exception.h 2001/10/11 14:57:53 1.14 @@ -2,10 +2,9 @@ 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.12 2001/05/17 10:22:24 parser Exp $ + $Id: pa_exception.h,v 1.14 2001/10/11 14:57:53 parser Exp $ */ #ifndef PA_EXCEPTION_H @@ -15,6 +14,15 @@ #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: @@ -33,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