Annotation of parser3/src/main/pa_xml_exception.C, revision 1.6

1.1       paf         1: /** @file
                      2:        Parser: exception class.
                      3: 
1.4       paf         4:        Copyright (c) 2001-2005 ArtLebedev Group (http://www.artlebedev.com)
1.1       paf         5:        Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru)
                      6: */
                      7: 
                      8: #include "pa_config_includes.h"
                      9: 
                     10: #ifdef XML
                     11: 
1.6     ! misha      12: static const char * const IDENT="$Date: 2005-12-16 10:15:12 $";
1.1       paf        13: 
                     14: #include "pa_xml_exception.h"
                     15: #include "pa_globals.h"
                     16: #include "pa_common.h"
                     17: 
                     18: // methods
                     19: 
1.6     ! misha      20: XmlException::XmlException(const String* aproblem_source, const char* aproblem_comment, ...) {
1.1       paf        21:        ftype="xml";
                     22:        fproblem_source=aproblem_source;
                     23: 
1.6     ! misha      24:        if(aproblem_comment) {
        !            25:                fcomment=new(PointerFreeGC) char[MAX_STRING];
        !            26:                va_list args;
        !            27:                va_start(args, aproblem_comment);
        !            28:                vsnprintf(fcomment, MAX_STRING, aproblem_comment, args);
        !            29:                va_end(args);
        !            30:        } else if(const char* xml_generic_errors=xmlGenericErrors())
1.5       paf        31:                fcomment=pa_strdup(xml_generic_errors);
1.6     ! misha      32:        else
1.5       paf        33:                fcomment="-UNKNOWN ERROR-";
1.1       paf        34: }
                     35: #endif

E-mail: