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

Cannot add include file. Such exception is thrown when OKS cannot add include file. More...

#include <file.hpp>

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

Public Member Functions

 FileLockError (const OksFile &file, bool lock_action, const std::string &reason) noexcept
virtual ~FileLockError () 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, bool lock_action, const std::string &reason) noexcept

Detailed Description

Cannot add include file. Such exception is thrown when OKS cannot add include file.

Definition at line 50 of file file.hpp.

Constructor & Destructor Documentation

◆ FileLockError()

dunedaq::oks::FileLockError::FileLockError ( const OksFile & file,
bool lock_action,
const std::string & reason )
inlinenoexcept

The constructor gets reason from non-oks exception. If lock_action = true, then cannot lock file. Otherwise cannot unlock file.

Definition at line 60 of file file.hpp.

61 : exception(fill(file, lock_action, reason), 0)
62 {
63 }
static std::string fill(const OksFile &file, bool lock_action, const std::string &reason) noexcept
Definition file.cpp:246
exception(const std::string &what_arg, int level_arg) noexcept
Definition xml.cpp:41

◆ ~FileLockError()

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

Definition at line 65 of file file.hpp.

65{}

Member Function Documentation

◆ fill()

std::string dunedaq::oks::FileLockError::fill ( const OksFile & file,
bool lock_action,
const std::string & reason )
staticprivatenoexcept

Definition at line 246 of file file.cpp.

247{
248 return (std::string("Failed to ") + (lock_action ? "" : "un") + "lock file \'" + file.get_full_file_name() +
249 "\' because:\n" + reason);
250}

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