Skip to content

Commit 4ea5191

Browse files
committed
Fix fatal error should throw instead of return
1 parent d6d2cf9 commit 4ea5191

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

app.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ models.sequelize.sync().then(function () {
484484
// check if realtime is ready
485485
if (history.isReady() && realtime.isReady()) {
486486
models.Revision.checkAllNotesRevision(function (err, notes) {
487-
if (err) return new Error(err);
487+
if (err) throw new Error(err);
488488
if (!notes || notes.length <= 0) return startListen();
489489
});
490490
}
@@ -511,7 +511,7 @@ process.on('SIGINT', function () {
511511
var checkCleanTimer = setInterval(function () {
512512
if (history.isReady() && realtime.isReady()) {
513513
models.Revision.checkAllNotesRevision(function (err, notes) {
514-
if (err) return new Error(err);
514+
if (err) throw new Error(err);
515515
if (notes.length <= 0) {
516516
clearInterval(checkCleanTimer);
517517
return process.exit(0);

0 commit comments

Comments
 (0)