Skip to content

Commit 154868e

Browse files
committed
Capture NS_ERROR_FAILURE errors from Firefox
1 parent 830eb04 commit 154868e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/utils.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ function isEmptyObject(what) {
2626
// Sorta yanked from https://github.com/joyent/node/blob/aa3b4b4/lib/util.js#L560
2727
// with some tiny modifications
2828
function isError(what) {
29+
var toString = objectPrototype.toString.call(what);
2930
return isObject(what) &&
30-
objectPrototype.toString.call(what) === '[object Error]' ||
31+
toString === '[object Error]' ||
32+
toString === '[object Exception]' || // Firefox NS_ERROR_FAILURE Exceptions
3133
what instanceof Error;
3234
}
3335

0 commit comments

Comments
 (0)