add exception
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <experimental/source_location>
|
||||
#include <any>
|
||||
|
||||
#include "hack/utils/color.hpp"
|
||||
#include "hack/exception/title.hpp"
|
||||
@@ -22,6 +23,7 @@ namespace hack
|
||||
void system_error(const std::exception& e) noexcept { m_system_error = e.what(); }
|
||||
void title(const std::string v) noexcept { m_title = v; }
|
||||
void description(const std::string v) noexcept { m_description = v; }
|
||||
void set_data(std::any v) noexcept { m_data = v; }
|
||||
|
||||
void log()
|
||||
{
|
||||
@@ -52,5 +54,6 @@ namespace hack
|
||||
std::string m_title { exception_title::NO_VALID_DATA };
|
||||
std::string m_description;
|
||||
std::experimental::source_location m_location;
|
||||
std::any m_data;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user