We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1ff7d4b commit 01260b8Copy full SHA for 01260b8
lib/chain_manager.js
@@ -3,17 +3,18 @@ var web3 = require('web3');
3
var sha3_256 = require('js-sha3').sha3_256;
4
5
ChainManager = function() {
6
+ this.chainManagerConfig = {};
7
this.currentChain = {};
8
this.file = "";
9
}
10
11
ChainManager.prototype.loadConfigFile = function(filename) {
12
+ this.file = filename;
13
try {
14
var obj = JSON.parse(fs.readFileSync(filename));
- this.file = filename;
15
this.chainManagerConfig = obj;
16
} catch (e) {
- throw new Error("error reading " + filename);
17
+ console.warn("error reading " + filename + "; defaulting to empty set");
18
19
return this;
20
};
@@ -51,4 +52,3 @@ ChainManager.prototype.save = function() {
51
52
53
54
module.exports = ChainManager;
-
0 commit comments