add proper error state to encoder object parsing

fixes #36
This commit is contained in:
alisdair sullivan 2013-06-24 11:32:03 -06:00
parent 352d6b21cb
commit 8487a2afc0

View file

@ -113,7 +113,8 @@ object([{Key, Value}], {Handler, State}, Config) when is_atom(Key); is_binary(Ke
},
Config
);
object([], {Handler, State}, _Config) -> Handler:handle_event(end_object, State).
object([], {Handler, State}, _Config) -> Handler:handle_event(end_object, State);
object(Term, Handler, Config) -> ?error(object, Term, Handler, Config).
list([Value, Next|Rest], {Handler, State}, Config) ->
@ -303,4 +304,4 @@ custom_error_handler_test_() ->
)}
].
-endif.
-endif.