mirror of https://github.com/pkg/errors.git
parent
6d954f502e
commit
004deef562
|
@ -195,7 +195,7 @@ func Example_stackTrace() {
|
|||
func ExampleCause_printf() {
|
||||
err := errors.Wrap(func() error {
|
||||
return func() error {
|
||||
return errors.Errorf("hello %s", fmt.Sprintf("world"))
|
||||
return errors.New("hello world")
|
||||
}()
|
||||
}(), "failed")
|
||||
|
||||
|
|
|
@ -142,7 +142,7 @@ func TestStackTrace(t *testing.T) {
|
|||
}, {
|
||||
Cause(func() error {
|
||||
return func() error {
|
||||
return Errorf("hello %s", fmt.Sprintf("world"))
|
||||
return Errorf("hello %s", fmt.Sprintf("world: %s", "ooh"))
|
||||
}()
|
||||
}()), []string{
|
||||
`github.com/pkg/errors.TestStackTrace.func2.1` +
|
||||
|
|
Loading…
Reference in New Issue