Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
BaseException.cpp
Go to the documentation of this file.
2
3namespace storm {
4namespace exceptions {
6 // Intentionally left empty.
7}
8
9BaseException::BaseException(BaseException const& other) : exception(other), stream(other.stream.str()) {
10 // Intentionally left empty.
11}
12
14 stream << cstr;
15}
16
18 // Intentionally left empty.
19}
20
21const char* BaseException::what() const NOEXCEPT {
22 errorString = this->type() + ": " + this->stream.str();
23 if (!this->additionalInfo().empty()) {
24 errorString += " " + this->additionalInfo();
25 }
26 return errorString.c_str();
27}
28
29std::string BaseException::type() const {
30 return "BaseException";
31}
32
33std::string BaseException::additionalInfo() const {
34 return "";
35}
36} // namespace exceptions
37} // namespace storm
This class represents the base class of all exception classes.
BaseException()
Creates a base exception without a message.
virtual const char * what() const NOEXCEPT override
Retrieves the message associated with this exception.
virtual std::string additionalInfo() const
Returns additional information about the exception.
virtual ~BaseException()
Declare a destructor to counter the "looser throw specificator" error.
virtual std::string type() const
Returns the type of the exception.
LabParser.cpp.
Definition cli.cpp:18