Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catching errors #6

Open
mebibou opened this issue Mar 6, 2018 · 0 comments
Open

Catching errors #6

mebibou opened this issue Mar 6, 2018 · 0 comments

Comments

@mebibou
Copy link

mebibou commented Mar 6, 2018

When there is an error in the json, is there a way to catch it? even by using (error)="onError(event), the code always throws this error:

textmode.js:324 Error in onChange callback:  Error: Parse error on line 8:
...inputString",      },      {        "
----------------------^
Expecting 'STRING', got '}'
    at Object.parseError (jsonlint.js:55)
    at Object.parse (jsonlint.js:132)
    at Object.validate (util.js:223)
    at Object.parse (util.js:17)
    at JSONEditor.textmode.get (textmode.js:526)
    at Object.onChange (index.js:46)
    at JSONEditor.textmode._onChange (textmode.js:321)
    at Editor.EventEmitter._signal (index.js:3865)
    at Editor.onDocumentChange (index.js:13292)
    at EditSession.EventEmitter._signal (index.js:3865)

And therefore we never actually catch any errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant