Storm 1.10.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
BaseException.h
Go to the documentation of this file.
1#ifndef STORM_EXCEPTIONS_BASEEXCEPTION_H_
2#define STORM_EXCEPTIONS_BASEEXCEPTION_H_
3
4#include <exception>
5#include <sstream>
6
7namespace storm {
8namespace exceptions {
9
13class BaseException : public std::exception {
14 public:
19
25 BaseException(BaseException const& other);
26
30 BaseException(char const* cstr);
31
35 virtual ~BaseException();
36
42 virtual const char* what() const noexcept override;
43
47 virtual std::string type() const;
48
52 virtual std::string additionalInfo() const;
53
54 protected:
55 // This stream stores the message of this exception.
56 std::stringstream stream;
57
58 private:
59 // storage for the string backing the C string returned by what()
60 mutable std::string errorString;
61};
62
63} // namespace exceptions
64} // namespace storm
65
66#endif // STORM_EXCEPTIONS_BASEEXCEPTION_H_
This class represents the base class of all exception classes.
virtual const char * what() const noexcept override
Retrieves the message associated with this exception.
BaseException()
Creates a base exception without a message.
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.