From 680d43c95ebc2834d75b257e8de51c556d3da2d0 Mon Sep 17 00:00:00 2001 From: "bzbarsky%mit.edu" Date: Sat, 9 Sep 2006 04:58:39 +0000 Subject: [PATCH] try/catch around the loadURI call, since it can throw. Bug 310828, patch by Adam Guthrie , r+sr=bzbarsky, a=schrep for 1.8 branch git-svn-id: svn://10.0.0.236/trunk@209544 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/docshell/resources/content/netError.xhtml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mozilla/docshell/resources/content/netError.xhtml b/mozilla/docshell/resources/content/netError.xhtml index 882c162c367..5b3a7b8ee8f 100644 --- a/mozilla/docshell/resources/content/netError.xhtml +++ b/mozilla/docshell/resources/content/netError.xhtml @@ -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()