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

#include <file.hpp>

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

Public Member Functions

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

Detailed Description

File modification error.

Definition at line 75 of file file.hpp.

Constructor & Destructor Documentation

◆ FileChangeError() [1/2]

dunedaq::oks::FileChangeError::FileChangeError ( const OksFile & file,
const std::string & action,
const exception & reason )
inlinenoexcept

The constructor gets reason from nested oks exception.

Definition at line 80 of file file.hpp.

81 : exception(fill(file, action, reason.what()), reason.level() + 1)
82 {
83 }
static std::string fill(const OksFile &file, const std::string &action, const std::string &reason) noexcept
Definition file.cpp:253
exception(const std::string &what_arg, int level_arg) noexcept
Definition xml.cpp:41
std::string const reason(ers::Issue const &)

◆ FileChangeError() [2/2]

dunedaq::oks::FileChangeError::FileChangeError ( const OksFile & file,
const std::string & action,
const std::string & reason )
inlinenoexcept

The constructor gets reason from non-oks exception.

Definition at line 86 of file file.hpp.

87 : exception(fill(file, action, reason), 0)
88 {
89 }

◆ ~FileChangeError()

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

Definition at line 91 of file file.hpp.

91{}

Member Function Documentation

◆ fill()

std::string dunedaq::oks::FileChangeError::fill ( const OksFile & file,
const std::string & action,
const std::string & reason )
staticprivatenoexcept

Definition at line 253 of file file.cpp.

254{
255 return (std::string("Failed to ") + action + " of file \'" + file.get_full_file_name() + "\' because:\n" + reason);
256}

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