Leosac  0.8.0
Open Source Access Control
Leosac::Ex::Config Class Reference

An exception related to configuration. More...

#include <configexception.hpp>

+ Inheritance diagram for Leosac::Ex::Config:
+ Collaboration diagram for Leosac::Ex::Config:

Public Member Functions

 Config (const std::string &config_target, const std::string &config_entry, bool not_found)
 Construct a config exception for when we failed to load a property. More...
 
 Config (const std::string &filename)
 Create a config exception when we failed to parse a configuration file. More...
 
- Public Member Functions inherited from LEOSACException
 LEOSACException (const std::string &message)
 
virtual ~LEOSACException ()
 
virtual const char * what () const noexcept final
 
const Leosac::Tools::Stacktracetrace () const
 Get the stacktrace associated with this exception. More...
 

Static Private Member Functions

static std::string build_message (const std::string &config_target, const std::string &config_entry, bool not_found)
 
static std::string build_message (const std::string &filename)
 

Additional Inherited Members

- Protected Attributes inherited from LEOSACException
std::string message_
 

Detailed Description

An exception related to configuration.

Definition at line 33 of file configexception.hpp.

Constructor & Destructor Documentation

◆ Config() [1/2]

Leosac::Ex::Config::Config ( const std::string &  config_target,
const std::string &  config_entry,
bool  not_found 
)
inline

Construct a config exception for when we failed to load a property.

Parameters
config_targetThe subsystem that tried to use / load the configuration.
config_entryThe key (property) that is the source of the exception.
not_foundIs the exception due to not finding the key, or invalid entry.

Definition at line 46 of file configexception.hpp.

◆ Config() [2/2]

Leosac::Ex::Config::Config ( const std::string &  filename)
inline

Create a config exception when we failed to parse a configuration file.

Definition at line 56 of file configexception.hpp.

Member Function Documentation

◆ build_message() [1/2]

static std::string Leosac::Ex::Config::build_message ( const std::string &  config_target,
const std::string &  config_entry,
bool  not_found 
)
inlinestaticprivate

Definition at line 62 of file configexception.hpp.

◆ build_message() [2/2]

static std::string Leosac::Ex::Config::build_message ( const std::string &  filename)
inlinestaticprivate

Definition at line 78 of file configexception.hpp.


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