aboutsummaryrefslogtreecommitdiff
path: root/Exception.h
diff options
context:
space:
mode:
Diffstat (limited to 'Exception.h')
-rw-r--r--Exception.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/Exception.h b/Exception.h
index ab9cfce..5c84aad 100644
--- a/Exception.h
+++ b/Exception.h
@@ -7,32 +7,42 @@
class Exception : public std::exception {
public:
+ //! create an exception using printf-syntax
Exception(const char * fmt, ...);
virtual ~Exception();
+ //! get the formatted string
virtual const char * what();
protected:
Exception() = default;
+ //! internal variadic argument format handling
void va_format(va_list args, const char * fmt);
+ //! pointer to string returned by \p what()
char * error = NULL;
};
class ParserException : public Exception {
-public:
using Exception::Exception;
+
+public:
+ //! create an exception related to file format parsing
ParserException(const char * fmt, ...);
};
class CircuitException : public Exception {
-public:
using Exception::Exception;
+
+public:
+ //! create an exception related to the Circuit
CircuitException(const char * fmt, ...);
Node * node = nullptr;
};
class NodeException : public CircuitException {
-public:
using CircuitException::CircuitException;
+
+public:
+ //! create an exception related to a specific node in a Circuit
NodeException(Node * node, const char * fmt, ...);
};