UnCoVer (Using Coverability for Verification)
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | Protected Attributes | List of all members
InvalidStateException Class Reference

This exception is thrown if a function of an object was called, but the object was not in a valid state to call this function. More...

#include <InvalidStateException.h>

Inheritance diagram for InvalidStateException:
Inheritance graph
[legend]
Collaboration diagram for InvalidStateException:
Collaboration graph
[legend]

Public Member Functions

 InvalidStateException (string messageBody)
 Creates a new InvalidStateException with the specified string as message. More...
 
virtual ~InvalidStateException () throw ()
 Destroys the current instance of this InvalidStateException.
 
virtual const char * what () const override throw ()
 Returns a string representation of the exception. More...
 

Protected Attributes

string exceptionMessage
 Stores the message of the exception.
 

Detailed Description

This exception is thrown if a function of an object was called, but the object was not in a valid state to call this function.

This can happen for instance if a Timer object was not started before calling a the method to retrieve its elapsed time.

See Also
Timer
Author
Jan Stückrath

Constructor & Destructor Documentation

InvalidStateException ( string  messageBody)

Creates a new InvalidStateException with the specified string as message.

Parameters
messageBodythe message of the exception

Member Function Documentation

const char * what ( ) const
throw (
)
overridevirtualinherited

Returns a string representation of the exception.

This contains the exceptions name and the actual message.

Returns
a string representation (as const char*) of the exception

The documentation for this class was generated from the following files: