Skip to content

Commit

Permalink
fixup! Catch panic from bbolt open connection
Browse files Browse the repository at this point in the history
  • Loading branch information
gandarez committed Aug 7, 2023
1 parent 373d824 commit 55bdc90
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/offline/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ func (e ErrOpenDB) Error() string {

// Message method to implement wakaerror.Error interface.
func (e ErrOpenDB) Message() string {
return fmt.Sprintf("failed to open db connection: %s", e.Err)
return fmt.Sprintf("failed to open db file: %s", e.Err)
}
2 changes: 1 addition & 1 deletion pkg/offline/offline.go
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ func openDB(filepath string) (*bolt.DB, func(), error) {

db, err := bolt.Open(filepath, 0600, &bolt.Options{Timeout: 30 * time.Second})
if err != nil {
return nil, nil, fmt.Errorf("failed to open db connection: %s", err)
return nil, nil, fmt.Errorf("failed to open db file: %s", err)
}

return db, func() {
Expand Down

0 comments on commit 55bdc90

Please sign in to comment.