changes two rogue throw to error
This commit is contained in:
parent
6481bae328
commit
428858ed8c
2 changed files with 2 additions and 2 deletions
|
@ -218,7 +218,7 @@ proplist_to_events([{Key, Term}|Rest], Acc) ->
|
|||
proplist_to_events([], Acc) ->
|
||||
[end_object] ++ Acc;
|
||||
proplist_to_events(_, _) ->
|
||||
erlang:throw(badarg).
|
||||
erlang:error(badarg).
|
||||
|
||||
|
||||
list_to_events([Term|Rest], Acc) ->
|
||||
|
|
|
@ -164,7 +164,7 @@ encode(Acc, Opts) when is_list(Acc) ->
|
|||
iolist -> Acc
|
||||
; UTF when ?is_utf_encoding(UTF) ->
|
||||
unicode:characters_to_binary(Acc, utf8, UTF)
|
||||
; _ -> erlang:throw(badarg)
|
||||
; _ -> erlang:error(badarg)
|
||||
end;
|
||||
encode(string, String) ->
|
||||
[?quote, String, ?quote];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue