-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Suggest: remove default throw behavior #2276
Comments
Related (examples where making this a softer error could have helped): |
It would be preferable for users, but when you are developing a new grammar you'd like to get errors. Maybe we need both behaviours (some API parameter for a strict mode, turned off by default, but on in |
Sure. I’m fine with a flag to enable the prior behavior for debugging/development. Some type of auto detect would be even cooler but I’m not sure what we could reliably key that off of. Perhaps |
Sounds reasonable. |
Suggestion: We silently swallow errors vs throwing, thereby preserving the page layout and properly rendering at least unhighlighted code blocks (class 'hljs', etc) rather than potentially doing NOTHING leaving the page in an even uglier state.
This should already be an edge case, the question is would it be nicer to go ahead and do our best to recover vs just giving up? I think in many types of failure conditions (such as a single broken/incompatible language) this would be preferable to the WHOLE library failing to work.
The text was updated successfully, but these errors were encountered: