Skip to content
This repository has been archived by the owner on Sep 7, 2018. It is now read-only.

Commit

Permalink
better error logging
Browse files Browse the repository at this point in the history
  • Loading branch information
dominykas committed Dec 30, 2015
1 parent 5fc0d72 commit 14fe6fa
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions bin/buster-test
Expand Up @@ -3,7 +3,7 @@ var path = require("path");
var testCli = require("buster-test-cli");

process.on("uncaughtException", function (err) {
console.log(err.stack);
console.error("Uncaught exception:", err.stack ? err.stack : err);
});

var busterPath = path.join(__dirname, "..", "lib", "buster");
Expand All @@ -27,5 +27,8 @@ testCli.create(process.stdout, process.stderr, {
]
}
}).run(process.argv.slice(2), function (err) {
if (err) { setTimeout(process.exit.bind(null, 1), 5); }
if (err) {
console.error("buster-test run failed:", err.stack ? err.stack : err);
setTimeout(process.exit.bind(null, 1), 5);
}
});

0 comments on commit 14fe6fa

Please sign in to comment.