Discussion:
Exceptions in RPC Functions
Nobody III
2016-07-24 00:47:37 UTC
Permalink
RPC functions often throw exceptions. What exactly happens when these
exceptions are thrown? Most importantly, what happens on the server side?
Does the RPC call just end as soon as the error is thrown, allowing the
server and the session to continue normally?
Stefan Kalkowski
2016-07-25 14:20:45 UTC
Permalink
Hi Nobody III,
Post by Nobody III
RPC functions often throw exceptions. What exactly happens when these
exceptions are thrown? Most importantly, what happens on the server side?
Does the RPC call just end as soon as the error is thrown, allowing the
server and the session to continue normally?
As long as the exceptions are declared within the RPC description, like
for instance this one:

GENODE_RPC_THROW(Rpc_create, Capability<Region_map>, create,
GENODE_TYPE_LIST(Out_of_metadata), size_t);

those kind of exceptions are caught in the server loop, and the server
will immediately reply with an appropriated error code, which is
detected on the client side and again reconverted into a C++ exception.
So yes: "the RPC call just end as soon as the error is thrown, allowing
the server and the session to continue normally" as long as it is an
exception expected by the RPC interface.

Regards
Stefan
Post by Nobody III
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
genode-main mailing list
https://lists.sourceforge.net/lists/listinfo/genode-main
--
Stefan Kalkowski
Genode Labs

https://github.com/skalk ยท http://genode.org/
Loading...