Open tpronk opened 3 years ago
Do you mean refactoring PsychoJS._captureErrors()
? An example would be nice, thanks
It would require some refactoring yes. Example: catch_syntax error.zip.
catch_error.js
)trigger_error.js
)Because both files are included (and evaluated) separately, the syntax error can be caught this way.
The counterexample is this demo: https://gitlab.pavlovia.org/tpronk/tutorial_js_syntax_error
I think that, because the error catching is part of the module that gets imported by this experiment-script (which contains a syntax error), nothing gets evaluated at all, so the error catching doesn't work.
In that case, instead of the "Experiment is initialising..." text that participants see now, they could get an error message similar to the ones presented on a semantic error.