From 9df087ede0b539ecbd2778236c7d1143362b384d Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Thu, 7 Nov 2024 18:57:04 +0100 Subject: check code standard --- src/crepe/Exception.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/crepe/Exception.h (limited to 'src/crepe/Exception.h') diff --git a/src/crepe/Exception.h b/src/crepe/Exception.h new file mode 100644 index 0000000..e4a7bb8 --- /dev/null +++ b/src/crepe/Exception.h @@ -0,0 +1,23 @@ +#pragma once + +#include +#include + +namespace crepe { + +//! Exception class with printf-style constructor +class Exception : public std::exception { +public: + //! printf + Exception(const char * fmt, ...); + //! Get formatted error message + const char * what(); + +protected: + Exception() = default; + //! Formatted error message + std::string error; + +}; + +} -- cgit v1.2.3