ATLAS Offline Software
Loading...
Searching...
No Matches
FakeBkgTools::Database::XmlError Struct Reference

This propagates an error message + the reference to the faulty piece of XML when an exception is raised. More...

#include <Database.h>

Inheritance diagram for FakeBkgTools::Database::XmlError:
Collaboration diagram for FakeBkgTools::Database::XmlError:

Public Member Functions

 XmlError (const StringRef &l)
 XmlError (const char *s, std::size_t length)
XmlErroroperator<< (const char *msg)
XmlErroroperator<< (const std::string &msg)
XmlErroroperator<< (int msg)
virtual const char * what () const noexcept override

Public Attributes

std::string reason
const StringRef location

Detailed Description

This propagates an error message + the reference to the faulty piece of XML when an exception is raised.

Definition at line 123 of file Database.h.

Constructor & Destructor Documentation

◆ XmlError() [1/2]

FakeBkgTools::Database::XmlError::XmlError ( const StringRef & l)
inline

Definition at line 127 of file Database.h.

127: reason(""), location(l) {}

◆ XmlError() [2/2]

FakeBkgTools::Database::XmlError::XmlError ( const char * s,
std::size_t length )
inline

Definition at line 128 of file Database.h.

128: reason(""), location(s, s+length) {}
double length(const pvec &v)

Member Function Documentation

◆ operator<<() [1/3]

XmlError & FakeBkgTools::Database::XmlError::operator<< ( const char * msg)
inline

Definition at line 129 of file Database.h.

129{ reason += msg; return *this; }
MsgStream & msg
Definition testRead.cxx:32

◆ operator<<() [2/3]

XmlError & FakeBkgTools::Database::XmlError::operator<< ( const std::string & msg)
inline

Definition at line 130 of file Database.h.

130{ reason += msg; return *this; }

◆ operator<<() [3/3]

XmlError & FakeBkgTools::Database::XmlError::operator<< ( int msg)
inline

Definition at line 131 of file Database.h.

131{ reason += std::to_string(msg); return *this; }

◆ what()

virtual const char * FakeBkgTools::Database::XmlError::what ( ) const
inlineoverridevirtualnoexcept

Definition at line 132 of file Database.h.

132{ return reason.c_str(); }

Member Data Documentation

◆ location

const StringRef FakeBkgTools::Database::XmlError::location

Definition at line 126 of file Database.h.

◆ reason

std::string FakeBkgTools::Database::XmlError::reason

Definition at line 125 of file Database.h.


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