changes two rogue throw to error

This commit is contained in:
alisdair sullivan 2011-04-26 20:07:21 -07:00
parent 6481bae328
commit 428858ed8c
2 changed files with 2 additions and 2 deletions

View file

@ -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) ->

View file

@ -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];