ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
XIncludeErrHandler Class Reference

#include <XincludeErrHandler.h>

Inheritance diagram for XIncludeErrHandler:
Collaboration diagram for XIncludeErrHandler:

Public Member Functions

 XIncludeErrHandler ()
 
 ~XIncludeErrHandler ()
 
 XIncludeErrHandler (const XIncludeErrHandler &)=delete
 
void operator= (const XIncludeErrHandler &)=delete
 
bool getSawErrors () const
 
bool handleError (const xercesc::DOMError &domError)
 
void resetErrors ()
 

Private Attributes

bool m_errors
 

Detailed Description

Definition at line 11 of file XincludeErrHandler.h.

Constructor & Destructor Documentation

◆ XIncludeErrHandler() [1/2]

XIncludeErrHandler::XIncludeErrHandler ( )

Definition at line 9 of file XincludeErrHandler.cxx.

9  : m_errors(false) {
10 }

◆ ~XIncludeErrHandler()

XIncludeErrHandler::~XIncludeErrHandler ( )
default

◆ XIncludeErrHandler() [2/2]

XIncludeErrHandler::XIncludeErrHandler ( const XIncludeErrHandler )
delete

Member Function Documentation

◆ getSawErrors()

bool XIncludeErrHandler::getSawErrors ( ) const
inline

Definition at line 20 of file XincludeErrHandler.h.

20  {
21  return m_errors;
22  }

◆ handleError()

bool XIncludeErrHandler::handleError ( const xercesc::DOMError &  domError)

Definition at line 15 of file XincludeErrHandler.cxx.

15  {
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 }

◆ operator=()

void XIncludeErrHandler::operator= ( const XIncludeErrHandler )
delete

◆ resetErrors()

void XIncludeErrHandler::resetErrors ( )

Definition at line 38 of file XincludeErrHandler.cxx.

38  {
39  m_errors = false;
40 }

Member Data Documentation

◆ m_errors

bool XIncludeErrHandler::m_errors
private

Definition at line 27 of file XincludeErrHandler.h.


The documentation for this class was generated from the following files:
toNative
std::string toNative(const XMLCh *str)
Definition: xmlUtilities.h:50
XIncludeErrHandler::m_errors
bool m_errors
Definition: XincludeErrHandler.h:27