|
Robot Raconteur Core C++ Library
|
Base class for Robot Raconteur exceptions. More...
#include <Error.h>
Public Member Functions | |
| RobotRaconteurException () | |
| Construct an empty RobtoRaconteurException(). | |
| RobotRaconteurException (MessageErrorType ErrorCode, const std::string &error, const std::string &message, const std::string &sub_name, const boost::intrusive_ptr< RRValue > ¶m) | |
| Construct a RobotRaconteurException. | |
| RobotRaconteurException (const std::string &message, std::exception &innerexception) | |
| Construct a RobotRaconteurException based on an existing exception. | |
| virtual std::string | ToString () |
| Returns a string representing the exception. | |
Public Attributes | |
| MessageErrorType | ErrorCode |
| Predefined error code. | |
| std::string | Error |
| Name of the error. | |
| std::string | Message |
| Message to pass to the user. | |
| std::string | ErrorSubName |
| An optional sub_name to further categorize the exception. | |
| boost::intrusive_ptr< RRValue > | ErrorParam |
| An optional parameter. | |
Base class for Robot Raconteur exceptions.
RobotRaconteurException represents an exception that can be serialized and passed to a remote node. The MessageErrorType contains an enum of predefined error codes that represent different potential errors. Each error code has a corresponding C++ exception that extends RobotRaconteurException.
User defined exception types can be declared in Service Definition files. The C++ exception is generated with the thunk source. These user defined exceptions extend RobotRaconteurRemoteException.
| RobotRaconteur::RobotRaconteurException::RobotRaconteurException | ( | MessageErrorType | ErrorCode, |
| const std::string & | error, | ||
| const std::string & | message, | ||
| const std::string & | sub_name, | ||
| const boost::intrusive_ptr< RRValue > & | param ) |
Construct a RobotRaconteurException.
| ErrorCode | The predefined error code for the exception |
| error | The error type name corresponding to the ErrorCode, or a user defined error type |
| message | A message to pass to the user |
| sub_name | An optional sub_name to further categorize the exception |
| param | An optional exception parameter |
| RobotRaconteur::RobotRaconteurException::RobotRaconteurException | ( | const std::string & | message, |
| std::exception & | innerexception ) |
Construct a RobotRaconteurException based on an existing exception.
This will result in an exception with error code MessageErrorType_UnknownException
| message | A message to pass to the user |
| innerexception | The existing exception |
|
virtual |
Returns a string representing the exception.
| std::string RobotRaconteur::RobotRaconteurException::Error |
Name of the error.
Name corresponding to predefined error code, or a user defined error type
| MessageErrorType RobotRaconteur::RobotRaconteurException::ErrorCode |
Predefined error code.
Error code that specifies the type of error
| boost::intrusive_ptr<RRValue> RobotRaconteur::RobotRaconteurException::ErrorParam |
An optional parameter.
Use this placeholder if data needs to be passed with the exception
| std::string RobotRaconteur::RobotRaconteurException::ErrorSubName |
An optional sub_name to further categorize the exception.
The sub_name should follow the Robot Raconteur naming rules. It should either be a single name or a fully qualified name using service definition naming rules
| std::string RobotRaconteur::RobotRaconteurException::Message |
Message to pass to the user.
Human readable message to pass to the user