|
OpenADFortTk (basic)
|
00001 #include <iostream> 00002 00003 #include <stdlib.h> 00004 #include <string.h> 00005 00006 #include "xercesc/sax/SAXParseException.hpp" 00007 00008 #include "XAIF_SAXErrorHandler.h" 00009 00010 namespace xaif2whirl { 00011 00012 void XAIF_SAXErrorHandler::warning(const xercesc::SAXParseException&) { 00013 // Ignore all warnings. 00014 } 00015 00016 void XAIF_SAXErrorHandler::error(const xercesc::SAXParseException& toCatch) { 00017 errors = true; 00018 std::cerr << "Error at file \"" 00019 << XercesStrX(toCatch.getSystemId()) 00020 << "\", line " << toCatch.getLineNumber() 00021 << ", column " << toCatch.getColumnNumber() 00022 << std::endl 00023 << " Message: " << XercesStrX(toCatch.getMessage()) 00024 << std::endl; 00025 } 00026 00027 void XAIF_SAXErrorHandler::fatalError(const xercesc::SAXParseException& toCatch) { 00028 errors = true; 00029 std::cerr << "Fatal Error at file \"" << XercesStrX(toCatch.getSystemId()) 00030 << "\", line " << toCatch.getLineNumber() 00031 << ", column " << toCatch.getColumnNumber() 00032 << std::endl 00033 << " Message: " << XercesStrX(toCatch.getMessage()) 00034 << std::endl; 00035 } 00036 00037 void XAIF_SAXErrorHandler::resetErrors() { 00038 errors = false; 00039 } 00040 00041 } // end namespace xaif2whirl 00042