call back with errors instead of throwing within the Storage module

This commit is contained in:
ansuz committed 2020-03-24 13:31:03 -04:00
1 parent 1240f4a2a5
commit e128683ffb
7 files changed
+30 -12

No files matched your search

+5 -1
View File
@@ -8,7 +8,11 @@ var Log;
nThen(function (w) {
// load the store which will be used for iterating over channels
// and performing operations like archival and deletion
Store.create(config, w(function (_) {
Store.create(config, w(function (err, _) {
if (err) {
w.abort();
throw err;
}
store = _;
}));
+5 -1
View File
@@ -34,7 +34,11 @@ var msSinceStart = function () {
nThen(function (w) {
// load the store which will be used for iterating over channels
// and performing operations like archival and deletion
Store.create(config, w(function (_) {
Store.create(config, w(function (err, _) {
if (err) {
w.abort();
throw err;
}
store = _;
})); // load the list of pinned files so you know which files
// should not be archived or deleted
+2 -1
View File
@@ -8,7 +8,8 @@ var Log;
nThen(function (w) {
// load the store which will be used for iterating over channels
// and performing operations like archival and deletion
Store.create(config, w(function (_) {
Store.create(config, w(function (err, _) {
if (err) { throw err; }
store = _;
}));