call back with errors instead of throwing within the Storage module
This commit is contained in:
@@ -215,12 +215,14 @@ module.exports.create = function (config, cb) {
|
||||
// create a pin store
|
||||
Store.create({
|
||||
filePath: pinPath,
|
||||
}, w(function (s) {
|
||||
}, w(function (err, s) {
|
||||
if (err) { throw err; }
|
||||
Env.pinStore = s;
|
||||
}));
|
||||
|
||||
// create a channel store
|
||||
Store.create(config, w(function (_store) {
|
||||
Store.create(config, w(function (err, _store) {
|
||||
if (err) { throw err; }
|
||||
config.store = _store;
|
||||
Env.msgStore = _store; // API used by rpc
|
||||
Env.store = _store; // API used by historyKeeper
|
||||
|
||||
Reference in New Issue
Block a user