Storm
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
8
9namespace storm {
10namespace exceptions {
11
15class BaseException : public std::exception {
16 public:
21
27 BaseException(BaseException const& other);
28
32 BaseException(char const* cstr);
33
37 virtual ~BaseException();
38
44 virtual const char* what() const NOEXCEPT override;
45
49 virtual std::string type() const;
50
54 virtual std::string additionalInfo() const;
55
56 protected:
57 // This stream stores the message of this exception.
58 std::stringstream stream;
59
60 private:
61 // storage for the string backing the C string returned by what()
62 mutable std::string errorString;
63};
64
65} // namespace exceptions
66} // namespace storm
67
68#endif // STORM_EXCEPTIONS_BASEEXCEPTION_H_
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