Catch exceptions on test page
Summary: This makes typing into the box bearable with break-on-exception enabled. Test Plan: Typed into box; I didn't blow up. Reviewers: emily Reviewed By: emily Subscribers: jessie Differential Revision: http://phabricator.khanacademy.org/D13314
This commit is contained in:
parent
d2f41a19a5
commit
317564a173
|
@ -27,7 +27,15 @@ function init() {
|
|||
reprocess();
|
||||
|
||||
function reprocess() {
|
||||
katex.render(input.value, math);
|
||||
try {
|
||||
katex.render(input.value, math);
|
||||
} catch (e) {
|
||||
if (e.__proto__ == katex.ParseError.prototype) {
|
||||
console.error(e);
|
||||
} else {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user