RobWorkProject  23.9.11-
Public Member Functions | Friends | List of all members
Exception Class Reference

Standard exception type of RobWork. More...

#include <Exception.hpp>

Inherits exception.

Public Member Functions

 Exception ()
 This constructor creates an empty Exception and should not be used.
 
 Exception (const rw::core::Message &message)
 Constructor. More...
 
 Exception (int id, const rw::core::Message &message)
 Constructor. More...
 
const rw::core::MessagegetMessage () const
 The message for the user describing the reason for the error. More...
 
int getId () const
 get id of this exception message More...
 
const char * what () const throw ()
 readable description of this esception More...
 

Friends

std::ostream & operator<< (std::ostream &out, const Exception &exp)
 Format to out the message of the exception exp. More...
 

Detailed Description

Standard exception type of RobWork.

All exception thrown within RobWork are of the type Exception.

An exception contains a message (of type Message) for the user and nothing else.

Constructor & Destructor Documentation

◆ Exception() [1/2]

Exception ( const rw::core::Message message)

Constructor.

Parameters
message[in] A message for a user.

◆ Exception() [2/2]

Exception ( int  id,
const rw::core::Message message 
)

Constructor.

Parameters
id[in] Integer Id to identify the exception
message[in] A message for a user.

Member Function Documentation

◆ getId()

int getId ( ) const
inline

get id of this exception message

Returns
id

◆ getMessage()

const rw::core::Message& getMessage ( ) const
inline

The message for the user describing the reason for the error.

Returns
The message for the user.

◆ what()

const char* what ( ) const
throw (
)
inline

readable description of this esception

Returns
string description

readable description of this esception

Returns
string description

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
const Exception exp 
)
friend

Format to out the message of the exception exp.

The format for the text is

<file>:<line> <message>
Returns
The stream out.

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