TomFrost/Cryptex

Error from invalid JSON is silently ignored

Opened this issue · 0 comments

Cryptex/src/index.js

Lines 168 to 172 in 820187e

try {
this._confFile = _.clone(require(path.resolve(this._opts.file)), true)
} catch (e) {
this._confFile = {}
}

What do you think about throwing a UserError here if e.name === "SyntaxError"?