41 lines
773 B
C++
41 lines
773 B
C++
#include <vector>
|
|
#include "hack/exception/exception.hpp"
|
|
#include "hack/logger/logger.hpp"
|
|
|
|
auto main(int argc, char *argv[]) -> int
|
|
{
|
|
try
|
|
{
|
|
hack::exception e;
|
|
e.title("Test exception");
|
|
e.description("Super description for test exception");
|
|
e.service("example");
|
|
std::vector<int> vi = { 1, 2, 3 };
|
|
e.set("vector int", vi);
|
|
e.set("int", 1);
|
|
e.set("float", 1.13f);
|
|
e.set("double", 1.23);
|
|
|
|
// struct user_type
|
|
// {
|
|
// int i = 1;
|
|
// std::string str = "user type";
|
|
//
|
|
// auto get_logger_data()
|
|
// {
|
|
// return std::make_tuple(i, str);
|
|
// }
|
|
// } ut;
|
|
//
|
|
// e.set("user type", ut);
|
|
throw e;
|
|
}
|
|
catch(hack::exception& e)
|
|
{
|
|
hack::log()(e);
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|