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

Cannot change comment. Such exception is thrown when OKS cannot change comment. More...

#include <file.hpp>

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

Public Member Functions

 FailedChangeComment (const OksFile &file, const std::string &creation_time, const exception &reason) noexcept
 FailedChangeComment (const OksFile &file, const std::string &creation_time, const std::string &reason) noexcept
virtual ~FailedChangeComment () 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 OksFile &file, const std::string &creation_time, const std::string &reason) noexcept

Detailed Description

Cannot change comment. Such exception is thrown when OKS cannot change comment.

Definition at line 266 of file file.hpp.

Constructor & Destructor Documentation

◆ FailedChangeComment() [1/2]

dunedaq::oks::FailedChangeComment::FailedChangeComment ( const OksFile & file,
const std::string & creation_time,
const exception & reason )
inlinenoexcept

The constructor gets reason from nested oks exception.

Definition at line 271 of file file.hpp.

272 : exception(fill(file, creation_time, reason.what()), reason.level() + 1)
273 {
274 }
static std::string fill(const OksFile &file, const std::string &creation_time, const std::string &reason) noexcept
Definition file.cpp:239
exception(const std::string &what_arg, int level_arg) noexcept
Definition xml.cpp:41
std::string const reason(ers::Issue const &)

◆ FailedChangeComment() [2/2]

dunedaq::oks::FailedChangeComment::FailedChangeComment ( const OksFile & file,
const std::string & creation_time,
const std::string & reason )
inlinenoexcept

The constructor gets reason from non-oks exception.

Definition at line 277 of file file.hpp.

278 : exception(fill(file, creation_time, reason), 0)
279 {
280 }

◆ ~FailedChangeComment()

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

Definition at line 282 of file file.hpp.

282{}

Member Function Documentation

◆ fill()

std::string dunedaq::oks::FailedChangeComment::fill ( const OksFile & file,
const std::string & creation_time,
const std::string & reason )
staticprivatenoexcept

Definition at line 239 of file file.cpp.

240{
241 return (std::string("Failed to change comment created at \'") + creation_time + "\' from file \'" +
242 file.get_full_file_name() + "\' because:\n" + reason);
243}

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