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

1.1       paf         1: /** @file
                      2:        Parser: exception class.
                      3: 
1.7       moko        4:        Copyright (c) 2001-2012 Art. Lebedev Studio (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: 
                     12: #include "pa_xml_exception.h"
                     13: #include "pa_globals.h"
                     14: #include "pa_common.h"
                     15: 
1.8     ! moko       16: volatile const char * IDENT_PA_XML_EXCEPTION_C="$Id: pa_xml_exception.C,v 1.7 2012/03/16 09:24:14 moko Exp $" IDENT_PA_XML_EXCEPTION_H;
1.7       moko       17: 
1.1       paf        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);
1.8     ! moko       28:                vsnprintf((char *)fcomment, MAX_STRING, aproblem_comment, args);
1.6       misha      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: