mirror of
https://github.com/jakcron/nstool
synced 2024-11-15 02:06:40 +00:00
35 lines
710 B
C++
35 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_;
|
|
};
|
|
}
|
|
|
|
|