// file : xsd/cxx/xml/dom/bits/error-handler-proxy.txx // author : Boris Kolpackov // copyright : Copyright (c) 2005-2008 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file #include namespace xsd { namespace cxx { namespace xml { namespace dom { namespace bits { template bool error_handler_proxy:: handleError (const xercesc::DOMError& e) { using xercesc::DOMError; if (e.getSeverity() != DOMError::DOM_SEVERITY_WARNING) failed_ = true; if (native_eh_) return native_eh_->handleError (e); else { typedef typename error_handler::severity severity; severity s (severity::error); switch (e.getSeverity()) { case DOMError::DOM_SEVERITY_WARNING: { s = severity::warning; break; } case DOMError::DOM_SEVERITY_ERROR: { s = severity::error; break; } case DOMError::DOM_SEVERITY_FATAL_ERROR: { s = severity::fatal; break; } } XMLSSize_t l (e.getLocation ()->getLineNumber ()); XMLSSize_t c (e.getLocation ()->getColumnNumber ()); return eh_->handle ( transcode (e.getLocation()->getURI ()), (l == -1 ? 0 : static_cast (l)), (c == -1 ? 0 : static_cast (c)), s, transcode (e.getMessage ())); } } } } } } }