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.
25 lines
820 B
25 lines
820 B
#include "src/exceptions/BaseException.h"
|
|
|
|
namespace storm {
|
|
namespace exceptions {
|
|
BaseException::BaseException() : exception() {
|
|
// Intentionally left empty.
|
|
}
|
|
|
|
BaseException::BaseException(BaseException const& other) : exception(other), stream(other.stream.str()) {
|
|
// Intentionally left empty.
|
|
}
|
|
|
|
BaseException::BaseException(char const* cstr) {
|
|
stream << cstr;
|
|
}
|
|
|
|
const char* BaseException::what() const throw() {
|
|
std::string errorString = this->stream.str();
|
|
char* result = new char[errorString.size() + 1];
|
|
result[errorString.size()] = '\0';
|
|
std::copy(errorString.begin(), errorString.end(), result);
|
|
return result;
|
|
}
|
|
}
|
|
}
|