diff options
Diffstat (limited to 'frontend/Exception.h')
-rw-r--r-- | frontend/Exception.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/frontend/Exception.h b/frontend/Exception.h new file mode 100644 index 0000000..633cb4f --- /dev/null +++ b/frontend/Exception.h @@ -0,0 +1,17 @@ +#pragma once + +#include <cstdarg> +#include <exception> +#include <memory> + +class Exception : public std::exception { +public: + Exception(const char * fmt, ...); + const char * what(); + +protected: + Exception() = default; + void va_format(va_list args, const char * fmt); + std::unique_ptr<char> error = NULL; +}; + |