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 219 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 224 of file object.hpp.

224: 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:93
caught dunedaq::conffwk::Exception exception
std::string const reason(ers::Issue const &)

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

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

◆ ~ObjectSetError()

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

Definition at line 229 of file object.hpp.

229{ }

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

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

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