diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-07 18:57:04 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-07 18:57:04 +0100 |
commit | 9df087ede0b539ecbd2778236c7d1143362b384d (patch) | |
tree | 01a1c0c46da3a09137fcb9ca6e613fd1148f4df1 /src/crepe/Exception.cpp | |
parent | e36ea050972fcaaf3d85d672755bad4ebb2dcd80 (diff) |
check code standard
Diffstat (limited to 'src/crepe/Exception.cpp')
-rw-r--r-- | src/crepe/Exception.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/crepe/Exception.cpp b/src/crepe/Exception.cpp new file mode 100644 index 0000000..f27d5a8 --- /dev/null +++ b/src/crepe/Exception.cpp @@ -0,0 +1,19 @@ +#include <cstdarg> + +#include "Exception.h" +#include "util/fmt.h" + +using namespace std; +using namespace crepe; + +const char * Exception::what() { + return error.c_str(); +} + +Exception::Exception(const char * fmt, ...) { + va_list args; + va_start(args, fmt); + this->error = va_stringf(args, fmt); + va_end(args); +} + |