Skip to content

Commit

Permalink
Temporarily print errors until meteor-promise exception handling is f…
Browse files Browse the repository at this point in the history
…ixed

See meteor/promise#2
  • Loading branch information
martijnwalraven committed Aug 25, 2015
1 parent c7d4cb5 commit b6e9a85
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
4 changes: 4 additions & 0 deletions tools/cli/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1406,6 +1406,10 @@ Fiber(function () {
} else if (e instanceof main.ExitWithCode) {
process.exit(e.code);
} else {
Console.rawError(
"(main.js) Exception:",
e && e.stack || e
);
throw e;
}
}
Expand Down
24 changes: 16 additions & 8 deletions tools/runners/run-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -845,14 +845,22 @@ _.extend(AppRunner.prototype, {
}, 3000);
};

var runResult = self._runOnce({
onListen: function () {
if (! self.noRestartBanner && ! firstRun)
runLog.logRestart();
},
beforeRun: resetCrashCount,
firstRun: firstRun
});
try {
var runResult = self._runOnce({
onListen: function () {
if (! self.noRestartBanner && ! firstRun)
runLog.logRestart();
},
beforeRun: resetCrashCount,
firstRun: firstRun
});
} catch (error) {
Console.rawError(
"(run-app.js) Exception:",
error && error.stack || error
);
process.exit(1);
}
firstRun = false;

clearTimeout(crashTimer);
Expand Down

0 comments on commit b6e9a85

Please sign in to comment.