Remove unhandled rejection tracking

Modern Node.js does this now.
This commit is contained in:
Domenic Denicola 2017-01-02 19:34:55 -05:00
commit 853b76a881
2 changed files with 0 additions and 19 deletions

View file

@ -1,17 +0,0 @@
"use strict";
let currentId = 0;
const tracker = new WeakMap();
process.on("unhandledRejection", function (reason, promise) {
tracker.set(promise, ++currentId);
console.error(`Unhandled rejection (${currentId}): `);
console.error(reason.stack);
});
process.on("rejectionHandled", function (promise) {
const id = tracker.get(promise);
tracker.delete(promise);
console.error(`Rejection handled (${id})`);
});

View file

@ -10,8 +10,6 @@ const convert = require("./convert.js");
const scaffold = require("./scaffold.js");
const zip = require("./zip.js");
require("./track-rejections.js");
const argv = yargs
.usage(`${packageJson.description}\n\n${packageJson.name} [<command1> [<command2> [<command3> ...]]]\n\n` +
"Each command will fail if the previously-listed one has not yet been run (with matching options).")