Storm 1.14.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
BaseException.h
Go to the documentation of this file.
1#pragma once
2
3#include <exception>
4#include <sstream>
5
6namespace storm {
7namespace exceptions {
8
12class BaseException : public std::exception {
13 public:
18
24 BaseException(BaseException const& other);
25
29 BaseException(char const* cstr);
30
34 virtual ~BaseException();
35
41 virtual const char* what() const noexcept override;
42
46 virtual std::string type() const;
47
51 virtual std::string additionalInfo() const;
52
53 protected:
54 // This stream stores the message of this exception.
55 std::stringstream stream;
56
57 private:
58 // storage for the string backing the C string returned by what()
59 mutable std::string errorString;
60};
61
62} // namespace exceptions
63} // namespace storm
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.