commented rethrown exceptions
This commit is contained in:
parent
a4d48fd8d9
commit
dd46f4394b
1 changed files with 4 additions and 0 deletions
|
@ -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.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue