From 706418ebf5fd4551efdac4fad70f66908f789ba4 Mon Sep 17 00:00:00 2001 From: Chi Ahrens Date: Fri, 29 May 2020 13:05:27 -0700 Subject: [PATCH] Do not abort on uncaught exception The following anywhere in the process will cause magellan to abort and exit: require('fs').createReadStream( '/tmp/' ); This prevents that. --- bin/magellan | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/magellan b/bin/magellan index 81373f0..a398438 100755 --- a/bin/magellan +++ b/bin/magellan @@ -11,6 +11,10 @@ const cli = require("../src/cli"); const settings = require("../src/settings"); const constants = require("../src/constants"); +process.on('uncaughtException', function (error) { + console.error("Magellan uncaughtException", error); +}); + co(function *() { cli.version();