mirror of
https://github.com/vtil-project/VTIL-Core
synced 2026-08-17 08:23:03 -04:00
Adding exception ::as_string,
This commit is contained in:
parent
7e85f61632
commit
6ce57af06d
1 changed files with 5 additions and 0 deletions
|
|
@ -31,6 +31,7 @@
|
|||
#include <cstdio>
|
||||
#include <type_traits>
|
||||
#include <chrono>
|
||||
#include <exception>
|
||||
#include <optional>
|
||||
#include "../util/lt_typeid.hpp"
|
||||
#include "../util/type_helpers.hpp"
|
||||
|
|
@ -166,6 +167,10 @@ namespace vtil::format
|
|||
{
|
||||
return std::to_string( x );
|
||||
}
|
||||
else if constexpr ( std::is_base_of_v<std::exception, T> )
|
||||
{
|
||||
return std::string{ x.what() };
|
||||
}
|
||||
else if constexpr ( std::is_same_v<base_type, std::string> ||
|
||||
std::is_same_v<base_type, const char*> )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue