26#ifndef ELEMENTSKERNEL_ELEMENTSKERNEL_EXCEPTION_H_
27#define ELEMENTSKERNEL_ELEMENTSKERNEL_EXCEPTION_H_
78 template <
typename... Args>
79 explicit Exception(
const char* string_format, Args&&... args);
97 const
char*
what() const noexcept override;
112 template <typename T>
126 template <
typename... Args>
130 template <
typename Last>
137 template <typename T, typename std::enable_if<std::is_same<T, ExitCode>::value>::type* =
nullptr>
141 template <typename T, typename std::enable_if<not std::is_same<T, ExitCode>::value>::type* =
nullptr>
146 template <
typename First,
typename... Rest>
152template <
typename Ex,
typename T,
159#define ELEMENTSKERNEL_ELEMENTSKERNEL_EXCEPTION_IMPL_
161#undef ELEMENTSKERNEL_ELEMENTSKERNEL_EXCEPTION_IMPL_
implementation of the templates declared in ElementsKernel/Exception.h
define a list of standard exit codes for executables
defines the macros to be used for explicit export of the symbols
ExitCode exitCode() const noexcept
void appendMessage(const T &message)
Appends in the end of the exception message the parameter.
Exception(const char *string_format, Args &&... args)
Constructs a new Exception with a message using format specifiers.
virtual ~Exception() noexcept
const ExitCode m_exit_code
Exception(ExitCode e=ExitCode::NOT_OK)
const char * what() const noexcept override
Exception(const Exception &rhs)=default
ExitCode
Strongly typed exit numbers.
#define ELEMENTS_API
Dummy definitions for the backward compatibility mode.
@ NOT_OK
Generic unknown failure.
ELEMENTS_API std::ostream & operator<<(std::ostream &, const Environment::Variable &)
ExitCodeHelper(const First &, const Rest &... rest)
ExitCode getCode(const T &t)
ExitCode getCode(const T &)
ExitCodeHelper(const Last &last)