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

#include <object.hpp>

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

Public Member Functions

 ObjectBindError (const OksObject *obj, const OksData *data, const OksRelationship *rel, bool is_error, const std::string &why, const exception &reason) noexcept
 ObjectBindError (const OksObject *obj, const OksData *data, const OksRelationship *rel, bool is_error, const std::string &why, const std::string &reason) noexcept
virtual ~ObjectBindError () 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

Public Attributes

const OksData * p_data
const OksRelationship * p_rel
bool p_is_error

Private Member Functions

std::string fill (const OksObject *obj, const OksRelationship *rel, const std::string &why, const std::string &reason)

Detailed Description

Failed to init object.

Definition at line 312 of file object.hpp.

Constructor & Destructor Documentation

◆ ObjectBindError() [1/2]

dunedaq::oks::ObjectBindError::ObjectBindError ( const OksObject * obj,
const OksData * data,
const OksRelationship * rel,
bool is_error,
const std::string & why,
const exception & reason )
inlinenoexcept

Get reason from nested oks exception.

Definition at line 317 of file object.hpp.

323 : exception(fill(obj, rel, why, reason.what()), reason.level() + 1)
324 , p_data(data)
325 , p_is_error(is_error)
326 {
327 }
std::string fill(const OksObject *obj, const OksRelationship *rel, const std::string &why, const std::string &reason)
Definition object.cpp:131
exception(const std::string &what_arg, int level_arg) noexcept
Definition xml.cpp:41
std::string const reason(ers::Issue const &)
msgpack::object obj

◆ ObjectBindError() [2/2]

dunedaq::oks::ObjectBindError::ObjectBindError ( const OksObject * obj,
const OksData * data,
const OksRelationship * rel,
bool is_error,
const std::string & why,
const std::string & reason )
inlinenoexcept

Get reason from nested non-oks exception.

Definition at line 330 of file object.hpp.

336 : exception(fill(obj, rel, why, reason), 0)
337 , p_data(data)
338 , p_is_error(is_error)
339 {
340 }

◆ ~ObjectBindError()

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

Definition at line 342 of file object.hpp.

342{}

Member Function Documentation

◆ fill()

std::string dunedaq::oks::ObjectBindError::fill ( const OksObject * obj,
const OksRelationship * rel,
const std::string & why,
const std::string & reason )
private

Definition at line 131 of file object.cpp.

135{
136 p_rel = rel;
137 std::ostringstream s;
138 s << "Failed to bind relationship";
139 if (p_rel) {
140 s << " \"" << p_rel->get_name() << '\"';
141 } else {
142 s << 's';
143 }
144 s << " of object " << obj << " because:\n" << why;
145 if (!reason.empty())
146 s << '\n' << reason;
147 return s.str();
148}
const OksRelationship * p_rel
Definition object.hpp:345
const std::string & get_name() const noexcept

Member Data Documentation

◆ p_data

const OksData* dunedaq::oks::ObjectBindError::p_data

Definition at line 344 of file object.hpp.

◆ p_is_error

bool dunedaq::oks::ObjectBindError::p_is_error

Definition at line 346 of file object.hpp.

◆ p_rel

const OksRelationship* dunedaq::oks::ObjectBindError::p_rel

Definition at line 345 of file object.hpp.


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