Permalink
Browse files

Fix try/catch pattern match when decoding modfuns.

  • Loading branch information...
1 parent 0e0119e commit caa3d9ef90aa11c69cea42cbd29cf94ee1ce6613 @seancribbs seancribbs committed Feb 27, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/riak_pb_codec.erl
View
@@ -357,7 +357,7 @@ decode_modfun(#rpbmodfun{module=Mod, function=Fun}=MF, _Prop) ->
try
{binary_to_existing_atom(Mod, latin1), binary_to_existing_atom(Fun, latin1)}
catch
- exit:{badarg,_} ->
+ error:badarg ->
error_logger:warning_msg("Creating new atoms from protobuffs message! ~p", [MF]),
{binary_to_atom(Mod, latin1), binary_to_atom(Fun, latin1)}
end.

0 comments on commit caa3d9e

Please sign in to comment.