MCPcopy
hub / github.com/cubefs/cubefs / NewErrorf

Function NewErrorf

util/errors/errors.go:45–53  ·  view source on GitHub ↗
(format string, a ...interface{})

Source from the content-addressed store, hash-verified

43}
44
45func NewErrorf(format string, a ...interface{}) error {
46 msg := fmt.Sprintf(format, a...)
47 _, file, line, _ := runtime.Caller(1)
48 _, fileName := path.Split(file)
49
50 return &ErrorTrace{
51 msg: fmt.Sprintf("[%v %v] %v", fileName, line, msg),
52 }
53}
54
55func (e *ErrorTrace) Error() string {
56 return e.msg

Callers 15

printGoroutineInfoFunction · 0.92
mainFunction · 0.92
mountFunction · 0.92
StartMethod · 0.92
mainFunction · 0.92
doStartFunction · 0.92
opBlockCachePutMethod · 0.92
opBlockCacheGetMethod · 0.92
opBlockCacheEvictMethod · 0.92
parserConfMethod · 0.92
GetMethod · 0.92
PutMethod · 0.92

Calls 1

SplitMethod · 0.65

Tested by

no test coverage detected