Skip to content

Commit 75cf004

Browse files
committed
Catch & log db.close errors
1 parent c784c6f commit 75cf004

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/sqlitestore.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,10 @@ SQLiteStore.prototype.saveArticle = function saveArticle (body, title, oldid) {
7171
SQLiteStore.prototype.close = function () {
7272
var self = this;
7373
return P.delay(1000)
74-
.then(function() { return self.db.closeAsync(); });
74+
.then(function() { return self.db.closeAsync(); })
75+
.catch(function(e) {
76+
console.error(e);
77+
});
7578
};
7679

7780
module.exports = function makeSQLiteStore(options) {

0 commit comments

Comments
 (0)