-
Notifications
You must be signed in to change notification settings - Fork 0
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
Implement global try/catch error to catch all unexpected js errors #7
Comments
I will insert an intentional error in step 2 so we can test this scenario. If error happens I will remove all event listeners. I don’t think we need to do anything else. |
On a second thought, I don't think we need this. Using a global try/catch in Formwizrd class would only catch errors thrown by code in that class, which is not what we want since we can deal with such errors during testing and before run-time. Errors thrown by 3rd party code would happen either before or after class has initialised which in either case would not harm the Formwizard. If error happens before, Formwizard won't initialise and form will run without js enhancements which is fine. If error happens after, it has no impact on Formwizard class. |
@amcoho Go ahead and add a js error that makes the form non-functional. We have to be able to reproduce a problem before we try to fix it. |
@amcoho Should we close this? |
catch block should de-initialize all the js initialization work so user can use the no-js version.
The text was updated successfully, but these errors were encountered: