mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-09-20 15:04:17 +00:00
Add operation context to user-facing error messages
Prefix raw err.Error() strings surfaced in CR statuses and CLI stderr with the failed operation.
Signed-off-by: chlins <chlins.zhang@gmail.com>
(cherry picked from commit e03ff894ff)
This commit is contained in:
+1
-1
@@ -27,7 +27,7 @@ import (
|
||||
func CheckError(err error) {
|
||||
if err != nil {
|
||||
if err != context.Canceled {
|
||||
fmt.Fprintf(os.Stderr, "An error occurred: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "velero: %v\n", err)
|
||||
}
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user