diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..5c7247b --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,7 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [] +} \ No newline at end of file diff --git a/bin/main.cpp b/bin/main.cpp index 16dedaa..aa1b2ac 100644 --- a/bin/main.cpp +++ b/bin/main.cpp @@ -9,6 +9,8 @@ #include "hack/patterns/ring_buffer.hpp" #include "hack/patterns/identificator.hpp" +// #include "hack/security/uuid.hpp" + auto main(int argc, char *argv[]) -> int { // patterns::ring_buffer @@ -26,6 +28,11 @@ auto main(int argc, char *argv[]) -> int hack::log()(v); } + // security + { + // hack::log()(hack::security::generate_uuid()); + } + // patterns::identificator { struct a : public hack::patterns::identificator<> diff --git a/src/hack/exception/exception.hpp b/src/hack/exception/exception.hpp index 94f96aa..741ada3 100644 --- a/src/hack/exception/exception.hpp +++ b/src/hack/exception/exception.hpp @@ -1,6 +1,7 @@ #pragma once #include +#include #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; }; }