aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal
diff options
context:
space:
mode:
Diffstat (limited to 'internal')
-rw-r--r--internal/fmsg/errors.go11
1 files changed, 8 insertions, 3 deletions
diff --git a/internal/fmsg/errors.go b/internal/fmsg/errors.go
index 1a0632dc..bf9884f6 100644
--- a/internal/fmsg/errors.go
+++ b/internal/fmsg/errors.go
@@ -4,6 +4,7 @@ import (
"fmt"
"log"
"reflect"
+ "strings"
)
// baseError implements a basic error container
@@ -76,8 +77,12 @@ func PrintBaseError(err error, fallback string) {
var e *BaseError
if AsBaseError(err, &e) {
- log.Print(e.Message())
- } else {
- log.Println(fallback, err)
+ if msg := e.Message(); strings.TrimSpace(msg) != "" {
+ log.Print(msg)
+ return
+ }
+ Verbose("*"+fallback, err)
+ return
}
+ log.Println(fallback, err)
}