Exceptions
Overview
Robot Raconteur uses exceptions to handle errors. Robot Raconteur has a built-in set of exceptions defined
by the library, and also allows custom exceptions to be defined in service definitions.
See the Framework Exceptions Documentation
for a full list of exceptions, and the documentation for each programming language for how they are used.
All custom exceptions extend RobotRaconteurRemoteException.
Robot Raconteur can transparently pass exceptions from the service to the client (or client to service for callbacks).
The following operations will transparently pass exceptions:
* property get and set
* function calls
* objref get
* pipe connect and close endpoints (for client)
* callback calls (passing from client to service)
* wire connect, close (for clients), peek, and poke
* memory all operations
The example service definition experimental.exception_example contains a custom exception and an object
with functions that will throw exceptions as an example. The service definition is shown below:
The following example code demonstrates how to catch exceptions thrown by the example service: