-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add error boundaries [in-progress by @kaushlakers] #1351
Comments
I can take a stab at this if that's sounds okay. :) I'm a complete newbie to OSS, but I was able to understand "most" of the words in the description, so it felt doable. |
Have at it, @kaushlakers! Let me know when you're ready for me to take a look. |
Awesome! I'll dig in and come back here with more clarifications 😃 |
@bvaughn after digging in a bit, looks like there's 2 kinds of errors that are dealt with. One is when babel fails to load, in which case, we just display an error message. Other case is the errorMessage we display in the CodeMirrorPanel when compiles/evals fail. Do we want to display a backup error message for these unknown errors in the CodeMirrorPanel since the assumption is that babel has properly loaded already? Also please let me know if I'm completely on the wrong path here 😃 |
I was thinking we might just add a top-level error boundary (to the I've added error handling in the various places I think errors are likely to occur. This would just be to catch ones I hadn't anticipated. 😄 |
Sounds good! 👍 |
@bvaughn your move 😄 Thanks! |
Great! Happy to help on other tasks too, if needed. 😃 |
Cool! Check out some other beginner friendly or help wanted tasks if you're looking for ideas. 😄 |
Since the REPL is already using React 16, we should take advantage of the new
componentDidCatch
error handling lifecycle.As we move forward on issues like #858 and #1292, it would be nice to add
componentDidCatch
to a couple of key components. The REPL currently usestry
/catch
statements where errors are likely to occur (egcompile
,eval
) but error boundaries would be a nice backup for any cases that slip through the cracks.The text was updated successfully, but these errors were encountered: