mirror of
https://github.com/jakcron/nstool
synced 2024-12-25 22:21:13 +00:00
58 lines
917 B
C++
58 lines
917 B
C++
#include "exception.h"
|
|
|
|
using namespace fnd;
|
|
|
|
Exception::Exception() noexcept :
|
|
what_(""),
|
|
module_(""),
|
|
level_(E_FATAL)
|
|
{
|
|
|
|
}
|
|
|
|
Exception::Exception(const std::string & what) noexcept :
|
|
what_(what),
|
|
module_(""),
|
|
level_(E_FATAL)
|
|
{
|
|
}
|
|
|
|
Exception::Exception(const std::string & what, ExceptionLevel level) noexcept :
|
|
what_(what),
|
|
module_(""),
|
|
level_(level)
|
|
{
|
|
}
|
|
|
|
Exception::Exception(const std::string & module, const std::string & what) noexcept :
|
|
what_(what),
|
|
module_(module),
|
|
level_(E_FATAL)
|
|
{
|
|
}
|
|
|
|
Exception::Exception(const std::string & module, const std::string & what, ExceptionLevel level) noexcept :
|
|
what_(what),
|
|
module_(module),
|
|
level_(level)
|
|
{
|
|
}
|
|
|
|
Exception::~Exception()
|
|
{
|
|
}
|
|
|
|
const char* Exception::what() const noexcept
|
|
{
|
|
return what_.c_str();
|
|
}
|
|
|
|
const char* Exception::module() const noexcept
|
|
{
|
|
return module_.c_str();
|
|
}
|
|
|
|
bool Exception::is_fatal() const noexcept
|
|
{
|
|
return level_ == E_FATAL;
|
|
}
|