Open eproxus opened 3 years ago
Sorry for the late reply. Currently, there is no plan to improve the error handling code. However, I think that it's great to make it better if it's possible to do that without performance overhead. Unfortunately, I have no time to try that. But feel free to put a PR if you're interested in it.
@sile I'd be happy to create a PR. After some initial research it seems that replacing the exception defined here should do the trick: https://github.com/sile/jsone/blob/master/src/jsone_decode.erl#L42
Can you confirm?
Thanks for your investigation. It sound good 👍
Is there any plan to add better errors than just
badarg
? It's problematic when trying to encode/decode inside more complex code:It's impossible to know where the
badarg
error comes from without checking the stack trace.I apologize if this have been considered already, since there might be a lot of code changes / possible overhead (e.g. if try-catch is used).