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 OksDatap_data
 
const OksRelationshipp_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 286 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 291 of file object.hpp.

291 :
292 exception (fill(obj, rel, why, reason.what()), reason.level() + 1),
293 p_data(data), p_is_error(is_error) { }
std::string fill(const OksObject *obj, const OksRelationship *rel, const std::string &why, const std::string &reason)
Definition object.cpp:125
caught dunedaq::conffwk::Exception exception
std::string const reason(ers::Issue const &)

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

296 :
297 exception (fill(obj, rel, why, reason), 0),
298 p_data(data), p_is_error(is_error) { }

◆ ~ObjectBindError()

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

Definition at line 300 of file object.hpp.

300{ }

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

126 {
127 p_rel = rel;
128 std::ostringstream s;
129 s << "Failed to bind relationship";
130 if(p_rel) { s << " \"" << p_rel->get_name() << '\"'; } else { s << 's'; }
131 s << " of object " << obj << " because:\n" << why;
132 if(!reason.empty()) s << '\n' << reason;
133 return s.str();
134 }
const OksRelationship * p_rel
Definition object.hpp:303
const std::string & get_name() const noexcept

Member Data Documentation

◆ p_data

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

Definition at line 302 of file object.hpp.

◆ p_is_error

bool dunedaq::oks::ObjectBindError::p_is_error

Definition at line 304 of file object.hpp.

◆ p_rel

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

Definition at line 303 of file object.hpp.


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