changed error reporting for utf8 decoder, utf16 and utf32 variants currently throwing untrapped errors
This commit is contained in:
parent
ad0b87aa37
commit
fbbfc3bebb
2 changed files with 60 additions and 33 deletions
|
@ -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) ->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue