Browse Source

fixed brackets in BaseException

tempestpy_adaptions
gereon 12 years ago
parent
commit
004633b79a
  1. 12
      src/exceptions/BaseException.h

12
src/exceptions/BaseException.h

@ -8,13 +8,11 @@ namespace storm {
namespace exceptions {
template<typename E>
class BaseException : public std::exception
{
class BaseException : public std::exception {
public:
BaseException() : exception() {}
BaseException(const BaseException& cp)
: exception(cp), stream(cp.stream.str())
{
: exception(cp), stream(cp.stream.str()) {
}
BaseException(const char* cstr) {
@ -24,14 +22,12 @@ class BaseException : public std::exception
~BaseException() throw() { }
template<class T>
E& operator<<(const T& var)
{
E& operator<<(const T& var) {
this->stream << var;
return * dynamic_cast<E*>(this);
}
virtual const char* what() const throw()
{
virtual const char* what() const throw() {
return this->stream.str().c_str();
}

Loading…
Cancel
Save