Jayson Vantuyl kagato@REDACTED
Thu Feb 18 09:38:34 CET 2010

I've encountered unexpected behavior when doing rpc:call/4 to a remote node and the remote code has an exception.

The "error case" seems to be {badrpc,Reason}, with reason completely unspecified.  Oddly, I get the following behavior:

erlang:exit(X) gives {badrpc, {'EXIT',X}.
erlang:raise(X) gives {badrpc, {'EXIT',X,StackTrace}.
erlang:throw(X) gives X.

The first two are pretty reasonable.  The third one is a bit odd.

In a number of places, the rpc:call infrastructure seems to use the archaic:

> case catch .... of ... end.

In modern code, I would assume this would be the more expressive:

> try ... of ... catch ... end.

What is the expected behavior (the docs are a bit vague)?

Jayson Vantuyl

More information about the erlang-questions mailing list