Geant4-11
Public Member Functions | Private Attributes
G4GDMLErrorHandler Class Reference

#include <G4GDMLRead.hh>

Inheritance diagram for G4GDMLErrorHandler:

Public Member Functions

void error (const xercesc::SAXParseException &exception)
 
void fatalError (const xercesc::SAXParseException &exception)
 
 G4GDMLErrorHandler (const G4bool set)
 
void resetErrors ()
 
void warning (const xercesc::SAXParseException &exception)
 

Private Attributes

G4bool Suppress = false
 

Detailed Description

Definition at line 51 of file G4GDMLRead.hh.

Constructor & Destructor Documentation

◆ G4GDMLErrorHandler()

G4GDMLErrorHandler::G4GDMLErrorHandler ( const G4bool  set)
inline

Definition at line 55 of file G4GDMLRead.hh.

55{ Suppress = set; }

References Suppress.

Member Function Documentation

◆ error()

void G4GDMLErrorHandler::error ( const xercesc::SAXParseException &  exception)
inline

Definition at line 69 of file G4GDMLRead.hh.

70 {
71 if(Suppress)
72 {
73 return;
74 }
75 char* message = xercesc::XMLString::transcode(exception.getMessage());
76 G4cout << "G4GDML: VALIDATION ERROR! " << message
77 << " at line: " << exception.getLineNumber() << G4endl;
78 xercesc::XMLString::release(&message);
79 }
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout

References G4cout, G4endl, and Suppress.

Referenced by fatalError().

◆ fatalError()

void G4GDMLErrorHandler::fatalError ( const xercesc::SAXParseException &  exception)
inline

Definition at line 81 of file G4GDMLRead.hh.

82 {
83 error(exception);
84 }
void error(const xercesc::SAXParseException &exception)
Definition: G4GDMLRead.hh:69

References error().

◆ resetErrors()

void G4GDMLErrorHandler::resetErrors ( )
inline

Definition at line 85 of file G4GDMLRead.hh.

85{}

◆ warning()

void G4GDMLErrorHandler::warning ( const xercesc::SAXParseException &  exception)
inline

Definition at line 57 of file G4GDMLRead.hh.

58 {
59 if(Suppress)
60 {
61 return;
62 }
63 char* message = xercesc::XMLString::transcode(exception.getMessage());
64 G4cout << "G4GDML: VALIDATION WARNING! " << message
65 << " at line: " << exception.getLineNumber() << G4endl;
66 xercesc::XMLString::release(&message);
67 }

References G4cout, G4endl, and Suppress.

Field Documentation

◆ Suppress

G4bool G4GDMLErrorHandler::Suppress = false
private

Definition at line 89 of file G4GDMLRead.hh.

Referenced by error(), G4GDMLErrorHandler(), and warning().


The documentation for this class was generated from the following file: