Skip to content

Commit c899839

Browse files
authored
feat(dispatchr): add cause for thrown error (#758)
1 parent 2518ccb commit c899839

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"format": "prettier --write .",
1717
"format:check": "prettier --check .",
1818
"lint": "eslint .",
19-
"test": "lerna run lint --since --stream && jest"
19+
"test": "lerna run lint --since --stream && jest --forceExit"
2020
},
2121
"devDependencies": {
2222
"@babel/cli": "^7.11.6",

packages/dispatchr/lib/Dispatcher.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ Dispatcher.prototype._throwOrCallErrorHandler =
188188
context
189189
);
190190
} else {
191-
throw new Error(message);
191+
throw new Error(message, { cause: meta && meta.error });
192192
}
193193
};
194194

0 commit comments

Comments
 (0)