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 74 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 79 of file file.hpp.

79: exception (fill(file, action, reason.what()), reason.level() + 1) { }
static std::string fill(const OksFile &file, const std::string &action, const std::string &reason) noexcept
Definition file.cpp:240
caught dunedaq::conffwk::Exception exception
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 82 of file file.hpp.

82: exception (fill(file, action, reason), 0) { }

◆ ~FileChangeError()

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

Definition at line 84 of file file.hpp.

84{ }

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

241 {
242 return ( std::string("Failed to ") + action + " of file \'" + file.get_full_file_name() + "\' because:\n" + reason);
243 }

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