ATLAS Offline Software
Loading...
Searching...
No Matches
XincludeErrHandler.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
6#include "xmlUtilities.h"
7#include <iostream>
8
11
13
14bool
15XIncludeErrHandler::handleError(const xercesc::DOMError& domError) {
16 bool continueParsing = true;
17
18 if (domError.getSeverity() == xercesc::DOMError::DOM_SEVERITY_WARNING) {
19 std::cout << "\nWarning at file ";
20 } else if (domError.getSeverity() == xercesc::DOMError::DOM_SEVERITY_ERROR) {
21 std::cout << "\nError at file ";
22 m_errors = true;
23 } else {
24 std::cout << "\nFatal Error at file ";
25 continueParsing = false;
26 m_errors = true;
27 }
28
29 std::cout << toNative(domError.getLocation()->getURI())
30 << ", line " << domError.getLocation()->getLineNumber()
31 << ", char " << domError.getLocation()->getColumnNumber()
32 << "\n Message: " << toNative(domError.getMessage()) << std::endl;
33
34 return continueParsing;
35}
36
37void
bool handleError(const xercesc::DOMError &domError)
std::string toNative(const XMLCh *str)