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

#include <object.hpp>

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

Public Member Functions

 ObjectSetError (const OksObject *obj, bool is_rel, const std::string &name, const exception &reason) noexcept
 ObjectSetError (const OksObject *obj, bool is_rel, const std::string &name, const std::string &reason) noexcept
virtual ~ObjectSetError () 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 set attribute or relationship value.

Definition at line 240 of file object.hpp.

Constructor & Destructor Documentation

◆ ObjectSetError() [1/2]

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

Get reason from nested oks exception.

Definition at line 245 of file object.hpp.

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

◆ ObjectSetError() [2/2]

dunedaq::oks::ObjectSetError::ObjectSetError ( 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 251 of file object.hpp.

252 : exception(fill(obj, is_rel, name, reason), 0)
253 {
254 }

◆ ~ObjectSetError()

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

Definition at line 256 of file object.hpp.

256{}

Member Function Documentation

◆ fill()

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

Definition at line 96 of file object.cpp.

97{
98 std::ostringstream s;
99 s << "Failed to set " << (is_rel ? "relationship" : "attribute") << " \'" << name << "\' of object " << obj << '\n'
100 << reason;
101 return s.str();
102}

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