DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
dunedaq::oks::ObjectGetError Class Reference

#include <object.hpp>

Inheritance diagram for dunedaq::oks::ObjectGetError:
[legend]
Collaboration diagram for dunedaq::oks::ObjectGetError:
[legend]

Public Member Functions

 ObjectGetError (const OksObject *obj, bool is_rel, const std::string &name, const exception &reason) noexcept
 
 ObjectGetError (const OksObject *obj, bool is_rel, const std::string &name, const std::string &reason) noexcept
 
virtual ~ObjectGetError () noexcept
 
- Public Member Functions inherited from dunedaq::oks::exception
 exception (const std::string &what_arg, int level_arg) noexcept
 
virtual ~exception () noexcept
 
int level () const noexcept
 
virtual const char * what () const noexcept
 

Static Private Member Functions

static std::string fill (const OksObject *obj, bool is_rel, const std::string &name, const std::string &reason)
 

Detailed Description

Failed to get attribute or relationship value.

Definition at line 241 of file object.hpp.

Constructor & Destructor Documentation

◆ ObjectGetError() [1/2]

dunedaq::oks::ObjectGetError::ObjectGetError ( const OksObject * obj,
bool is_rel,
const std::string & name,
const exception & reason )
inlinenoexcept

Get reason from nested oks exception.

Definition at line 246 of file object.hpp.

246: exception (fill(obj, is_rel, name, reason.what()), reason.level() + 1) { }
static std::string fill(const OksObject *obj, bool is_rel, const std::string &name, const std::string &reason)
Definition object.cpp:101
caught dunedaq::conffwk::Exception exception
std::string const reason(ers::Issue const &)

◆ ObjectGetError() [2/2]

dunedaq::oks::ObjectGetError::ObjectGetError ( const OksObject * obj,
bool is_rel,
const std::string & name,
const std::string & reason )
inlinenoexcept

Get reason from nested non-oks exception.

Definition at line 249 of file object.hpp.

249: exception (fill(obj, is_rel, name, reason), 0) { }

◆ ~ObjectGetError()

virtual dunedaq::oks::ObjectGetError::~ObjectGetError ( )
inlinevirtualnoexcept

Definition at line 251 of file object.hpp.

251{ }

Member Function Documentation

◆ fill()

std::string dunedaq::oks::ObjectGetError::fill ( const OksObject * obj,
bool is_rel,
const std::string & name,
const std::string & reason )
staticprivate

Definition at line 101 of file object.cpp.

102 {
103 std::ostringstream s;
104 s << "Failed to get " << (is_rel ? "relationship" : "attribute") << " \'" << name << "\' of object " << obj << '\n' << reason;
105 return s.str();
106 }

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