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 48 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 58 of file file.hpp.

58: exception (fill(file, lock_action, reason), 0) { }
static std::string fill(const OksFile &file, bool lock_action, const std::string &reason) noexcept
Definition file.cpp:234
caught dunedaq::conffwk::Exception exception

◆ ~FileLockError()

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

Definition at line 60 of file file.hpp.

60{ }

Member Function Documentation

◆ fill()

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

Definition at line 234 of file file.cpp.

235 {
236 return ( std::string("Failed to ") + (lock_action ? "" : "un") + "lock file \'" + file.get_full_file_name() + "\' because:\n" + reason);
237 }

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