You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

26 lines
720 B

#ifndef STORM_EXCEPTIONS_EXCEPTIONMACROS_H_
#define STORM_EXCEPTIONS_EXCEPTIONMACROS_H_
/*!
* Macro to generate descendant exception classes. As all classes are nearly the same, this makes changing common
* features much easier.
*/
#define STORM_NEW_EXCEPTION(exception_name) class exception_name : public BaseException { \
public: \
exception_name() : BaseException() { \
} \
exception_name(char const* cstr) : BaseException(cstr) { \
} \
exception_name(exception_name const& cp) : BaseException(cp) { \
} \
~exception_name() throw() { \
} \
template<typename T> \
exception_name& operator<<(T const& var) { \
this->stream << var; \
return *this; \
} \
};
#endif /* STORM_EXCEPTIONS_EXCEPTIONMACROS_H_ */