diff --git a/js/src/runner.js b/js/src/runner.js index 48d3931..336a592 100644 --- a/js/src/runner.js +++ b/js/src/runner.js @@ -93,4 +93,14 @@ runner = new Runner(nconf.get()); runner.initialize(); +process.on("uncaughtException", (function(_this) { + return function(err) { + debug(err); + if (("" + err) === "Error: got binary data when not reconstructing a packet") { + return; + } + return process.exit(1); + }; +})(this)); + //# sourceMappingURL=runner.js.map diff --git a/js/src/runner.js.map b/js/src/runner.js.map index 28de3b6..94c1018 100644 --- a/js/src/runner.js.map +++ b/js/src/runner.js.map @@ -6,5 +6,5 @@ "runner.coffee" ], "names": [], - "mappings": "AAAA,IAAA;;AAAA,KAAA,GAAQ,OAAA,CAAQ,OAAR;;AACR,OAAA,GAAU,OAAA,CAAQ,SAAR;;AACV,KAAA,GAAQ,OAAA,CAAQ,OAAR,CAAA,CAAiB,oBAAjB;;AAEF;EACW,gBAAC,OAAD;IAAC,IAAC,CAAA,SAAD;IACV,KAAA,CAAM,SAAN;EADS;;mBAKb,UAAA,GAAY,SAAA;WACR,IAAC,CAAA,QAAD,CAAU,CAAA,SAAA,KAAA;aAAA,SAAC,KAAD;QACN,KAAC,CAAA,IAAD,CAAA;eACA,KAAC,CAAA,cAAD,CAAgB,KAAhB;MAFM;IAAA,CAAA,CAAA,CAAA,IAAA,CAAV;EADQ;;mBAOZ,QAAA,GAAU,SAAC,QAAD;WACN,OAAO,CAAC,GAAR,CAAY,IAAC,CAAA,MAAM,CAAC,GAApB,EACI;MAAA,IAAA,EAAM,IAAN;MACA,EAAA,EAAI;QAAA,IAAA,EAAM,UAAN;OADJ;KADJ,EAGE,CAAA,SAAA,KAAA;aAAA,SAAC,KAAD,EAAQ,QAAR,EAAkB,IAAlB;QACE,IAAG,KAAH;UACI,KAAA,CAAM,KAAN;AACA,iBAAO,KAAC,CAAA,KAAD,CAAO,QAAP,EAFX;;QAGA,IAAG,CAAI,IAAP;UACI,KAAA,CAAM,oBAAN;AACA,iBAAO,KAAC,CAAA,KAAD,CAAO,QAA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CAAC,IAAR,CAAa,CAAb;EAH4B;AAAA,CAAA,CAAA,CAAA,IAAA,CAAhC" } \ No newline at end of file diff --git a/src/runner.coffee b/src/runner.coffee index df2be1d..528c65a 100644 --- a/src/runner.coffee +++ b/src/runner.coffee @@ -68,3 +68,7 @@ if config = nconf.get("config") || nconf.get("CONFIG") nconf.file file: config runner = new Runner nconf.get() runner.initialize() +process.on "uncaughtException", (err) => + debug err + return if "#{err}" == "Error: got binary data when not reconstructing a packet" + process.exit 1