Skip to content
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

catch any exception appending output #3621

Merged
merged 1 commit into from Jul 16, 2013
Merged

catch any exception appending output #3621

merged 1 commit into from Jul 16, 2013

Conversation

minrk
Copy link
Member

@minrk minrk commented Jul 12, 2013

HTML output can have javascript with errors, etc.

No output should ever raise, no matter what.

closes #3620

HTML output can have javascript with errors, etc.

No output should ever raise, no matter what.

closes ipython#3620
@Carreau
Copy link
Member

Carreau commented Jul 12, 2013

+1

.html("Javascript error adding output!<br/>" +
err.toString() +
'<br/>See your browser Javascript console for more details.')
.addClass('js-error')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so hey, fish out of whater in all this js, but don't you need to still append the updated toinsert after an error is caught, or does that get updated live somehow in the place where it already lives?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the tests I have run (html with bad javascript tag), the toinsert element is actually attached to the DOM before the error is raised (the attaching to the document is what results in the javascript actually executing, which in turn results in the exception). I suppose it is technically possible that the element appending would fail, but I haven't seen it happen, and might require a jQuery bug.

minrk added a commit that referenced this pull request Jul 16, 2013
catch any exception appending output

HTML output can have javascript with errors, etc.

No output should ever raise, no matter what.

closes #3620
@minrk minrk merged commit 08b57d9 into ipython:master Jul 16, 2013
@minrk minrk deleted the htmlerror branch July 16, 2013 00:10
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
catch any exception appending output

HTML output can have javascript with errors, etc.

No output should ever raise, no matter what.

closes ipython#3620
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

uncaught errors in HTML output
3 participants