|
OpenADFortTk (basic)
|
00001 // -*-Mode: C++;-*- 00002 // $Header: /m_home/m_utkej/Argonne/cvs2svn/cvs/OpenADFortTk/src/xaif2whirl/XAIF_DOMErrorHandler.cxx,v 1.2 2006-05-12 16:12:23 utke Exp $ 00003 00004 #include <iostream> 00005 00006 #include <stdlib.h> 00007 #include <string.h> 00008 00009 #include "xercesc/sax/SAXParseException.hpp" 00010 00011 #include "XAIF_DOMErrorHandler.h" 00012 00013 namespace xaif2whirl { 00014 00015 void XAIF_DOMErrorHandler::warning(const xercesc::SAXParseException&) { 00016 // Ignore all warnings. 00017 } 00018 00019 void XAIF_DOMErrorHandler::error(const xercesc::SAXParseException& toCatch) { 00020 errors = true; 00021 std::cerr << "Error at file \"" 00022 << XercesStrX(toCatch.getSystemId()) 00023 << "\", line " << toCatch.getLineNumber() 00024 << ", column " << toCatch.getColumnNumber() 00025 << std::endl 00026 << " Message: " << XercesStrX(toCatch.getMessage()) 00027 << std::endl; 00028 } 00029 00030 void XAIF_DOMErrorHandler::fatalError(const xercesc::SAXParseException& toCatch) { 00031 errors = true; 00032 std::cerr << "Fatal Error at file \"" << XercesStrX(toCatch.getSystemId()) 00033 << "\", line " << toCatch.getLineNumber() 00034 << ", column " << toCatch.getColumnNumber() 00035 << std::endl 00036 << " Message: " << XercesStrX(toCatch.getMessage()) 00037 << std::endl; 00038 } 00039 00040 void XAIF_DOMErrorHandler::resetErrors() { 00041 errors = false; 00042 } 00043 00044 }