Skip to content

Commit

Permalink
fail fatally if database cannot be opened
Browse files Browse the repository at this point in the history
  • Loading branch information
laochailan committed Mar 10, 2018
1 parent fb7a1d4 commit 184492d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions searchbuffer.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package main

import (
"errors"
"log"
"time"
"unicode/utf8"

Expand Down Expand Up @@ -106,6 +107,7 @@ func NewSearchBuffer(term string, typ SearchType) *SearchBuffer {
buf.database, status = notmuch.OpenDatabase(expandEnvHome(config.General.Database), 0)
if status != notmuch.STATUS_SUCCESS {
StatusLine = status.String()
log.Fatalln("Could not open notmuch database: ", status.String())
}

buf.refreshQuery()
Expand Down

0 comments on commit 184492d

Please sign in to comment.