MCPcopy Create free account
hub / github.com/chain/txvm / WithDetailf

Function WithDetailf

errors/errors.go:102–110  ·  view source on GitHub ↗

WithDetailf is like WithDetail, except it formats the detail message as in fmt.Printf. Function Detail will return the formatted text when called on the new error value.

(err error, format string, v ...interface{})

Source from the content-addressed store, hash-verified

100// Function Detail will return the formatted text
101// when called on the new error value.
102func WithDetailf(err error, format string, v ...interface{}) error {
103 if err == nil {
104 return nil
105 }
106 text := fmt.Sprintf(format, v...)
107 e1 := wrap(err, text, 1).(wrapperError)
108 e1.detail = append(e1.detail, text)
109 return e1
110}
111
112// Detail returns the detail message contained in err, if any.
113// An error has a detail message if it was made by WithDetail

Callers 6

BlockSigFunction · 0.92
BlockFunction · 0.92
BlockOnlyFunction · 0.92
BlockPrevFunction · 0.92
TxMethod · 0.92
valueToTopFunction · 0.92

Calls 1

wrapFunction · 0.85

Tested by

no test coverage detected