Skip to content

Commit

Permalink
Core: Capture the proper stack trace in onUnhandledRejection.
Browse files Browse the repository at this point in the history
  • Loading branch information
rwjblue committed Dec 18, 2017
1 parent f3e30f4 commit 9a77ca4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/on-unhandled-rejection.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ import { test } from "../test";

import config from "./config";
import { extend } from "./utilities";
import { sourceFromStacktrace } from "./stacktrace";

// Handle an unhandled rejection
export default function onUnhandledRejection( reason ) {
const resultInfo = {
result: false,
message: reason.message || "error",
actual: reason,
source: reason.stack
source: reason.stack || sourceFromStacktrace( 3 )
};

const currentTest = config.current;
Expand Down

0 comments on commit 9a77ca4

Please sign in to comment.