-
-
Notifications
You must be signed in to change notification settings - Fork 570
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
Pretty display of error unpauses terminal #875
Comments
So am I understanding correctly you want to be in the state where you never get out of pause if you call term::exception? This happens when an error happens, which means that something wrong is with the app. It probably will never get the chance to call resume, so the terminal will be broken until the user refreshes the page. Removing the |
Just read the note a the end. I think that the reason why it calls |
Added a fix. So a call to resume after Ajax call only when there was no pause before the call. |
Great, just checked with bleeding edge version (https://cdn.jsdelivr.net/gh/jcubic/jquery.terminal@devel/js/jquery.terminal.min.js) and it works good. |
Issue summary
when
term::exception()
is used to pretty print the JS error, it allows the user to see the source code of the error by clicking on the file names in the stack trace. But when they do this it enables the terminal regardless of whether the app calledterm::pause()
Expected behavior
If
term::pause()
has been called, the prompt will not re-appear when the user clicks the traceback linksActual behavior
When the user clicks the traceback links, the prompt re-appears
Steps to reproduce
Browser and OS
Chrome 108 64-bit on a chromebook.
Additional notes
I am using this library for a programming language interpreter, when the interpreter suffers a fatal error it is supposed to show the traceback using
term::exception()
and then block the user from entering anything else. But when they click the traceback they get a prompt back and then when they try to enter anything it causes the page to hang.The text was updated successfully, but these errors were encountered: