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 264 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 269 of file object.hpp.

270 : exception(fill(obj, is_rel, name, reason.what()), reason.level() + 1)
271 {
272 }
static std::string fill(const OksObject *obj, bool is_rel, const std::string &name, const std::string &reason)
Definition object.cpp:105
exception(const std::string &what_arg, int level_arg) noexcept
Definition xml.cpp:41
std::string const reason(ers::Issue const &)
msgpack::object obj

◆ 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 275 of file object.hpp.

276 : exception(fill(obj, is_rel, name, reason), 0)
277 {
278 }

◆ ~ObjectGetError()

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

Definition at line 280 of file object.hpp.

280{}

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 105 of file object.cpp.

106{
107 std::ostringstream s;
108 s << "Failed to get " << (is_rel ? "relationship" : "attribute") << " \'" << name << "\' of object " << obj << '\n'
109 << reason;
110 return s.str();
111}

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