Open
Description
verror.Errorf does not currently understand %w and leads to ugly output when it's used, see the example code below outputs:
err: t: cause: %!w(*errors.errorString=&{an error})
cause: an error
package main
import (
"errors"
"fmt"
"v.io/v23/verror"
)
func main() {
var (
cause = errors.New("an error")
err = verror.ErrInternal.Errorf(nil, "cause: %w", cause)
)
// The printing does not handle the "%w" nicely...
fmt.Printf("err: %v\n", err)
// ... even though the wrapping is done correctly.
fmt.Printf("cause: %v\n", errors.Unwrap(err))
}
Metadata
Metadata
Assignees
Labels
No labels