diff --git a/src/jsx.erl b/src/jsx.erl index 99388f2..46375f1 100644 --- a/src/jsx.erl +++ b/src/jsx.erl @@ -203,6 +203,7 @@ parser(OptsList) -> json_to_term(JSON) -> try json_to_term(JSON, []) + %% rethrow exception so internals aren't confusingly exposed to users catch error:badarg -> erlang:error(badarg) end. @@ -259,6 +260,7 @@ json_to_term(JSON) -> json_to_term(JSON, Opts) -> try jsx_eep0018:json_to_term(JSON, Opts) + %% rethrow exception so internals aren't confusingly exposed to users catch error:badarg -> erlang:error(badarg) end. @@ -270,6 +272,7 @@ json_to_term(JSON, Opts) -> term_to_json(JSON) -> try term_to_json(JSON, []) + %% rethrow exception so internals aren't confusingly exposed to users catch error:badarg -> erlang:error(badarg) end. @@ -314,6 +317,7 @@ term_to_json(JSON) -> term_to_json(JSON, Opts) -> try jsx_eep0018:term_to_json(JSON, Opts) + %% rethrow exception so internals aren't confusingly exposed to users catch error:badarg -> erlang:error(badarg) end.