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.
54 lines
1.5 KiB
54 lines
1.5 KiB
#ifndef STORM_EXCEPTIONS_BASEEXCEPTION_H_
|
|
#define STORM_EXCEPTIONS_BASEEXCEPTION_H_
|
|
|
|
#include <exception>
|
|
#include <sstream>
|
|
|
|
#include "src/utility/OsDetection.h"
|
|
|
|
namespace storm {
|
|
namespace exceptions {
|
|
|
|
/*!
|
|
* This class represents the base class of all exception classes.
|
|
*/
|
|
class BaseException : public std::exception {
|
|
public:
|
|
/*!
|
|
* Creates a base exception without a message.
|
|
*/
|
|
BaseException();
|
|
|
|
/*!
|
|
* Creates a base expression from the given exception.
|
|
*
|
|
* @param other The expression from which to copy-construct.
|
|
*/
|
|
BaseException(BaseException const& other);
|
|
|
|
/*!
|
|
* Adds the given string to the message of this exception.
|
|
*/
|
|
BaseException(char const* cstr);
|
|
|
|
/*!
|
|
* Declare a destructor to counter the "looser throw specificator" error
|
|
*/
|
|
virtual ~BaseException();
|
|
|
|
/*!
|
|
* Retrieves the message associated with this exception.
|
|
*
|
|
* @return The message associated with this exception.
|
|
*/
|
|
virtual const char* what() const NOEXCEPT override;
|
|
|
|
protected:
|
|
// This stream stores the message of this exception.
|
|
std::stringstream stream;
|
|
};
|
|
|
|
} // namespace exceptions
|
|
} // namespace storm
|
|
|
|
#endif // STORM_EXCEPTIONS_BASEEXCEPTION_H_
|