--- parser3/src/main/pa_exception.C 2002/01/23 10:38:18 1.34 +++ parser3/src/main/pa_exception.C 2002/02/08 07:27:47 1.37 @@ -1,10 +1,10 @@ /** @file Parser: exception class. - Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) + Copyright (c) 2001, 2002 ArtLebedev Group (http://www.artlebedev.com) Author: Alexander Petrosyan (http://paf.design.ru) - $Id: pa_exception.C,v 1.34 2002/01/23 10:38:18 paf Exp $ + $Id: pa_exception.C,v 1.37 2002/02/08 07:27:47 paf Exp $ */ #include "pa_common.h" @@ -96,15 +96,22 @@ Exception::Exception( } fcomment=(char *)malloc(MAX_STRING); - const char *xml_error_message= - xml_generic_errors?xml_generic_errors:""; + const char *xml_error_message; + const char *xml_error_prefix; + if(xml_generic_errors) { + xml_error_prefix="\n"; + xml_error_message=xml_generic_errors; + } else { + xml_error_prefix=""; + xml_error_message=""; + } if(exc) snprintf(fcomment, MAX_STRING, - "DOMException %s (%d).\n" - "%s", + "DOMException %s (%d)." + "%s%s", s, // decoded code of exception exc, // DOM exception code - xml_error_message // xml generic messages accumulated + xml_error_prefix, xml_error_message // xml generic messages accumulated ); else // no DOM exception snprintf(fcomment, MAX_STRING,