Skip to content
This repository has been archived by the owner on May 7, 2018. It is now read-only.

Throws ArgumentError on broken input #17

Open
rwz opened this issue Sep 11, 2013 · 0 comments
Open

Throws ArgumentError on broken input #17

rwz opened this issue Sep 11, 2013 · 0 comments
Labels

Comments

@rwz
Copy link

rwz commented Sep 11, 2013

So, if you pass invalid utf sequence to .decode method, you'd receive ArgumentError while expecting OkJson::Error

OkJson.decode("\255")
ArgumentError: invalid byte sequence in UTF-8
  from /gems/okjson/okjson.rb:264:in `match'
  from /gems/okjson/okjson.rb:264:in `numtok'
  from /gems/okjson/okjson.rb:253:in `tok'
  from /gems/okjson/okjson.rb:213:in `lex'
  from /gems/okjson/okjson.rb:44:in `decode'
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant