From 5376efe7e63ef3c848a971ea845a16c7e030d153 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Fri, 1 Nov 2024 17:38:33 +0100 Subject: move Exception to backend --- backend/Exception.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 backend/Exception.cpp (limited to 'backend/Exception.cpp') diff --git a/backend/Exception.cpp b/backend/Exception.cpp new file mode 100644 index 0000000..4044d6a --- /dev/null +++ b/backend/Exception.cpp @@ -0,0 +1,22 @@ +#include +#include +#include +#include + +#include "backend/String.h" + +#include "Exception.h" + +using namespace std; + +const char * Exception::what() { + return this->error.c_str(); +} + +Exception::Exception(const char * fmt, ...) { + va_list args; + va_start(args, fmt); + this->error = String::va_fmt(args, fmt); + va_end(args); +} + -- cgit v1.2.3