Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
ExceptionMacros.h
Go to the documentation of this file.
1#ifndef STORM_EXCEPTIONS_EXCEPTIONMACROS_H_
2#define STORM_EXCEPTIONS_EXCEPTIONMACROS_H_
3
8#define STORM_NEW_EXCEPTION(exception_name) \
9 class exception_name : public BaseException { \
10 public: \
11 exception_name() : BaseException() {} \
12 exception_name(char const* cstr) : BaseException(cstr) {} \
13 exception_name(exception_name const& cp) : BaseException(cp) {} \
14 ~exception_name() throw() {} \
15 virtual std::string type() const override { \
16 return #exception_name; \
17 } \
18 template<typename T> \
19 exception_name& operator<<(T const& var) { \
20 this->stream << var; \
21 return *this; \
22 } \
23 };
24
25#endif /* STORM_EXCEPTIONS_EXCEPTIONMACROS_H_ */