mirror of https://github.com/minio/minio.git
Merge pull request #809 from abperiasamy/ret-untrace
return *probe.Error for Untrace() as well.
This commit is contained in:
commit
2f260adc69
|
@ -108,18 +108,19 @@ func (e *Error) trace(fields ...string) *Error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Untrace erases last trace entry.
|
// Untrace erases last trace entry.
|
||||||
func (e *Error) Untrace() {
|
func (e *Error) Untrace() *Error {
|
||||||
if e == nil {
|
if e == nil {
|
||||||
return
|
return nil
|
||||||
}
|
}
|
||||||
e.lock.Lock()
|
e.lock.Lock()
|
||||||
defer e.lock.Unlock()
|
defer e.lock.Unlock()
|
||||||
|
|
||||||
l := len(e.CallTrace)
|
l := len(e.CallTrace)
|
||||||
if l == 0 {
|
if l == 0 {
|
||||||
return
|
return nil
|
||||||
}
|
}
|
||||||
e.CallTrace = e.CallTrace[:l-1]
|
e.CallTrace = e.CallTrace[:l-1]
|
||||||
|
return e
|
||||||
}
|
}
|
||||||
|
|
||||||
// ToGoError returns original error message.
|
// ToGoError returns original error message.
|
||||||
|
|
Loading…
Reference in New Issue