git ssb

15+

ansuz / dnssb



Commit 0068b7cc003aaab6f75a15f7e09f7e456a52e7eb

better error handling

ansuz committed on 10/31/2016, 4:53:57 PM
Parent: b357b56dacd821a496aeddf0de4a7b1713bc34a9

Files changed

index.jschanged
index.jsView
@@ -6,10 +6,14 @@
66 var Config;
77 try {
88 Config = require("./config.js");
99 } catch (err) {
10- console.error("\nCouldn't find './config.js'. Using defaults");
11- Config = require("./config.dist.js");
10 + if (err.code === 'MODULE_NOT_FOUND') {
11 + console.error("\nCouldn't find './config.js'. Using defaults");
12 + Config = require("./config.dist.js");
13 + } else {
14 + throw err;
15 + }
1216 }
1317
1418 var log = {
1519 req: function (req) {

Built with git-ssb-web