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

#include <object.hpp>

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

Public Member Functions

 FailedCreateObject (const OksObject *o, const exception &reason) noexcept
 FailedCreateObject (const OksObject *o, const std::string &reason) noexcept
virtual ~FailedCreateObject () 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 *o, const std::string &reason)

Detailed Description

Failed to create an object.

Definition at line 65 of file object.hpp.

Constructor & Destructor Documentation

◆ FailedCreateObject() [1/2]

dunedaq::oks::FailedCreateObject::FailedCreateObject ( const OksObject * o,
const exception & reason )
inlinenoexcept

Get reason from nested oks exception.

Definition at line 70 of file object.hpp.

71 : exception(fill(o, reason.what()), reason.level() + 1)
72 {
73 }
static std::string fill(const OksObject *o, const std::string &reason)
Definition object.cpp:64
exception(const std::string &what_arg, int level_arg) noexcept
Definition xml.cpp:41
std::string const reason(ers::Issue const &)

◆ FailedCreateObject() [2/2]

dunedaq::oks::FailedCreateObject::FailedCreateObject ( const OksObject * o,
const std::string & reason )
inlinenoexcept

Get reason from nested non-oks exception.

Definition at line 76 of file object.hpp.

77 : exception(fill(o, reason), 0)
78 {
79 }

◆ ~FailedCreateObject()

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

Definition at line 81 of file object.hpp.

81{}

Member Function Documentation

◆ fill()

std::string dunedaq::oks::FailedCreateObject::fill ( const OksObject * o,
const std::string & reason )
staticprivate

Definition at line 64 of file object.cpp.

65{
66 std::ostringstream s;
67 s << "Failed to create object " << o << '\n' << reason;
68 return s.str();
69}

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