PATCH: fixed rpc handling of uncaught throws

Jayson Vantuyl <>
Wed Feb 24 11:50:22 CET 2010


rpc:call/4 and friends would silently transform a thrown value into a return
value.  This could silently consume exceptions that would be errors in other
cases, which was undesireable.
    
In the case of exits and errors, these functions already synthesize an EXIT
tuple which is quite similar to the messages received when trapping exits of
other processes.  To stay consistent with this behavior, rpc:call now generates
a {nocatch,Value} error (with stacktrace, and wrapped in a badrpc tuple).
    
As such, when you execute a function via rpc, you can now expect for it to
either return the returned value, or generate an EXIT tuple that is identical
to the one that would be generated by a trapped exit but with the From field
removed.

git fetch git://github.com/jvantuyl/otp.git rpccall_update_to_use_try

-- 
Jayson Vantuyl




More information about the erlang-patches mailing list