mirror of
https://github.com/zotero/zotero.git
synced 2026-10-05 02:43:38 +00:00
Restore Error workaround in Bluebird to produce proper line numbers
I didn't really investigate this, but errors from the outside world seem to not pass the "obj instanceof Error" test due to some weirdness that Bluebird is doing. (When I took this out recently I thought we just were throwing some custom errors that didn't properly extend Error, but that isn't the issue.) This restores the earlier workaround.
This commit is contained in:
parent
3aaf9e341c
commit
c322eaa1bc
1 changed files with 3 additions and 0 deletions
|
|
@ -4675,6 +4675,9 @@ function originatesFromRejection(e) {
|
|||
}
|
||||
|
||||
function canAttachTrace(obj) {
|
||||
// Added by Zotero
|
||||
return obj.message && obj.stack && es5.propertyIsWritable(obj, "stack");
|
||||
|
||||
return obj instanceof Error && es5.propertyIsWritable(obj, "stack");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue