65 {
return {
"error",
"IO",
"workInProgress"}; }
74 {
return castFromValue<ExitCode>(exitCodeIndex); }
90 inline std::vector<ExitCode>
ExitCodeCast (
const std::vector<int> exitCodeIndeces)
91 {
return castFromValues<ExitCode>(exitCodeIndeces); }
99 inline std::vector<ExitCode>
ExitCodeCast (
const std::vector<std::string> exitCodeNames)
100 {
return castFromNames<ExitCode>(exitCodeNames,
ExitCodeNames()); }
203 const
char*
what () const noexcept
override
Exception()
default constructor
Exception(const std::string message, const ExitCode exitCode=ExitCode::_error_, const std::string header="\n", const std::string functionCBL=cbl::par::defaultString, const std::string fileCBL=cbl::par::defaultString)
constructor
virtual ~Exception() noexcept=default
default destructor
ExitCode exitCode() const noexcept
get the exit status
std::string m_message
the message describing the exception
std::string fileCBL() const noexcept
get the CBL file containing the function where the exception is raised
std::string m_fileCBL
the CBL file containing the function where the exception is raised
std::string m_functionCBL
the CBL function where the exception is raised
ExitCode m_exitCode
the exit status
const char * what() const noexcept override
the error description
std::string functionCBL() const noexcept
get the CBL function where the exception is raised
static const std::string col_red
red colour (used when printing something on the screen)
static const std::string col_default
default colour (used when printing something on the screen)
static const std::string col_yellow
yellow colour (used when printing something on the screen)
static const std::string col_blue
blue colour (used when printing something on the screen)
static const std::string col_purple
purple colour (used when printing something on the screen)
static const std::string defaultString
default std::string value
std::vector< std::string > ExitCodeNames()
return a std::vector containing the ExitCode names
@ _IO_
error related to the Input/Output
@ _workInProgress_
error due to work in progress
ExitCode ExitCodeCast(const int exitCodeIndex)
cast an enum of type ExitCode from its index
The global namespace of the CosmoBolognaLib