[bugzilla-gnome-org-extensions] Fix catch for cross-browser compatibility
- From: Krzesimir Nowak <krnowak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [bugzilla-gnome-org-extensions] Fix catch for cross-browser compatibility
- Date: Thu, 20 Nov 2014 22:23:04 +0000 (UTC)
commit 2fc21531b14b02258bc45ddc2d1b4efb59935060
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Wed Oct 7 23:55:09 2009 -0400
Fix catch for cross-browser compatibility
Apparently:
} catch (e if e instanceof ParseError) {
is Firefox specific. Test inside the catch block and
rethrow as needed instead.
js/xmlRpc.js | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/js/xmlRpc.js b/js/xmlRpc.js
index 49e5de7..2f1c7bf 100644
--- a/js/xmlRpc.js
+++ b/js/xmlRpc.js
@@ -200,8 +200,11 @@ function _handleSuccess(options, xml) {
throw new ParseError("Bad content of <methodResponse/>");
}
- } catch (e if e instanceof ParseError) {
- options.error(e.message);
+ } catch (e) {
+ if (e instanceof ParseError)
+ options.error(e.message);
+ else
+ throw e;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]