try/catch around the loadURI call, since it can throw. Bug 310828, patch by Adam Guthrie <ispiked@gmail.com>, r+sr=bzbarsky, a=schrep for 1.8 branch

git-svn-id: svn://10.0.0.236/trunk@209544 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzbarsky%mit.edu
2006-09-09 04:58:39 +00:00
parent e864d041ae
commit 680d43c95e

View File

@@ -95,7 +95,12 @@
// Session history has the URL of the page that failed
// to load, not the one of the error page. So, just call
// reload(), which will also repost POST data correctly.
location.reload();
try {
location.reload();
} catch (e) {
// We probably tried to reload a URI that caused an exception to
// occur; e.g. a non-existent file.
}
}
function initPage()