Robowflex  v0.1
Making MoveIt Easy
robowflex::Exception Class Reference

Exception that contains a message and an error code. More...

#include <util.h>

+ Inheritance diagram for robowflex::Exception:

Public Member Functions

 Exception (int value, const std::string &message)
 Constructor. More...
 
int getValue () const
 Get error code. More...
 
const std::stringgetMessage () const
 Get error message. More...
 
virtual const char * what () const throw ()
 
- Public Member Functions inherited from std::exception
what (T... args)
 
~exception (T... args)
 
operator= (T... args)
 
exception (T... args)
 

Protected Attributes

const int value_
 Error code. More...
 
const std::string message_
 Error message. More...
 

Detailed Description

Exception that contains a message and an error code.

Definition at line 14 of file util.h.

Constructor & Destructor Documentation

◆ Exception()

robowflex::Exception::Exception ( int  value,
const std::string message 
)
inline

Constructor.

Parameters
[in]valueError code.
[in]messageError message.

Definition at line 21 of file util.h.

21  : value_(value), message_(message)
22  {
23  }
const std::string message_
Error message.
Definition: util.h:46
const int value_
Error code.
Definition: util.h:45

Member Function Documentation

◆ getMessage()

const std::string& robowflex::Exception::getMessage ( ) const
inline

Get error message.

Definition at line 34 of file util.h.

35  {
36  return message_;
37  }

◆ getValue()

int robowflex::Exception::getValue ( ) const
inline

Get error code.

Definition at line 27 of file util.h.

28  {
29  return value_;
30  }

◆ what()

virtual const char* robowflex::Exception::what ( ) const
throw (
)
inlinevirtual

Definition at line 39 of file util.h.

40  {
41  return message_.c_str();
42  }
T c_str(T... args)

Member Data Documentation

◆ message_

const std::string robowflex::Exception::message_
protected

Error message.

Definition at line 46 of file util.h.

◆ value_

const int robowflex::Exception::value_
protected

Error code.

Definition at line 45 of file util.h.


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