mirror of
https://github.com/mjl-/mox.git
synced 2025-07-12 12:24:38 +03:00
consistently use log.Check for logging errors that "should not happen", don't influence application flow
sooner or later, someone will notice one of these messages, which will lead us to a bug.
This commit is contained in:
@ -23,7 +23,10 @@ func (f *Filter) tokenizeMail(path string) (bool, map[string]struct{}, error) {
|
||||
if err != nil {
|
||||
return false, nil, err
|
||||
}
|
||||
defer mf.Close()
|
||||
defer func() {
|
||||
err := mf.Close()
|
||||
f.log.Check(err, "closing message file")
|
||||
}()
|
||||
fi, err := mf.Stat()
|
||||
if err != nil {
|
||||
return false, nil, err
|
||||
|
Reference in New Issue
Block a user