changed error reporting for utf8 decoder, utf16 and utf32 variants currently throwing untrapped errors

This commit is contained in:
alisdair sullivan 2010-06-02 23:41:47 -07:00
parent ad0b87aa37
commit fbbfc3bebb
2 changed files with 60 additions and 33 deletions

View file

@ -54,10 +54,7 @@ start(Callbacks, OptsList) ->
start(Callbacks, Opts, F) ->
fun(Stream) ->
try F(Stream, [], Callbacks, Opts)
catch
error:function_clause -> {error, badjson}
; error:badjson -> {error, badjson}
end
catch error:badjson -> {error, badjson} end
end.
parse_opts(Opts) ->