mirror of
https://github.com/jakcron/nstool
synced 2024-12-26 14:41:14 +00:00
36 lines
710 B
C
36 lines
710 B
C
|
#pragma once
|
||
|
#include <exception>
|
||
|
#include <string>
|
||
|
|
||
|
namespace fnd
|
||
|
{
|
||
|
class Exception : public std::exception
|
||
|
{
|
||
|
public:
|
||
|
enum ExceptionLevel
|
||
|
{
|
||
|
E_RECOVERABLE,
|
||
|
E_FATAL,
|
||
|
};
|
||
|
|
||
|
Exception() noexcept;
|
||
|
Exception(const std::string& what) noexcept;
|
||
|
Exception(const std::string& what, ExceptionLevel level) noexcept;
|
||
|
Exception(const std::string& module, const std::string& what) noexcept;
|
||
|
Exception(const std::string& module, const std::string& what, ExceptionLevel level) noexcept;
|
||
|
|
||
|
|
||
|
~Exception();
|
||
|
|
||
|
const char* what() const noexcept;
|
||
|
const char* module() const noexcept;
|
||
|
bool is_fatal() const noexcept;
|
||
|
private:
|
||
|
std::string what_;
|
||
|
std::string module_;
|
||
|
ExceptionLevel level_;
|
||
|
};
|
||
|
}
|
||
|
|
||
|
|