--- parser3/src/main/pa_exception.C 2001/10/19 14:15:23 1.20 +++ parser3/src/main/pa_exception.C 2001/10/22 16:44:42 1.22 @@ -4,7 +4,7 @@ Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) Author: Alexander Petrosyan (http://design.ru/paf) - $Id: pa_exception.C,v 1.20 2001/10/19 14:15:23 parser Exp $ + $Id: pa_exception.C,v 1.22 2001/10/22 16:44:42 parser Exp $ */ #include "pa_common.h" @@ -21,14 +21,15 @@ Exception::Exception(const String *atype if(comment_fmt) { va_list args; va_start(args, comment_fmt); + fcomment=(char *)malloc(MAX_STRING); vsnprintf(fcomment, MAX_STRING, comment_fmt, args); va_end(args); } else - fcomment[0]=0; + fcomment=0; } #ifdef XML -void Exception::convert(Pool& pool, const String *source, const XSLException& e) { +void Exception::provide_source(Pool& pool, const String *source, const XSLException& e) { if(e.getURI().empty()) throw Exception(0, 0, source, @@ -49,14 +50,14 @@ void Exception::convert(Pool& pool, cons ); } -void Exception::convert(Pool& pool, const String *source, const SAXException& e) { +void Exception::provide_source(Pool& pool, const String *source, const SAXException& e) { throw Exception(0, 0, source, "%s", pool.transcode_cstr(XalanDOMString(e.getMessage())) // message for exception ); } -void Exception::convert(Pool& pool, const String *source, const SAXParseException& e) { +void Exception::provide_source(Pool& pool, const String *source, const SAXParseException& e) { throw Exception(0, 0, source, "%s. %s(%d:%d)", @@ -67,7 +68,7 @@ void Exception::convert(Pool& pool, cons } -void Exception::convert(Pool& pool, const String *source, const XMLException& e) { +void Exception::provide_source(Pool& pool, const String *source, const XMLException& e) { throw Exception(0, 0, source, "%s (%s). %s(%d)'", @@ -80,7 +81,7 @@ void Exception::convert(Pool& pool, cons ); } -void Exception::convert(Pool& pool, const String *source, const XalanDOMException& e) { +void Exception::provide_source(Pool& pool, const String *source, const XalanDOMException& e) { const char *s; int code=(int)e.getExceptionCode(); switch(code) {