You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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"
)
funcmain() {
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))
}
The text was updated successfully, but these errors were encountered:
verror.Errorf does not currently understand %w and leads to ugly output when it's used, see the example code below outputs:
The text was updated successfully, but these errors were encountered: