return *probe.Error for Untrace() as well.

master
Anand Babu (AB) Periasamy 9 years ago
parent 526c8b4d76
commit c11aa1c892
  1. 7
      pkg/probe/probe.go

@ -108,18 +108,19 @@ func (e *Error) trace(fields ...string) *Error {
}
// Untrace erases last trace entry.
func (e *Error) Untrace() {
func (e *Error) Untrace() *Error {
if e == nil {
return
return nil
}
e.lock.Lock()
defer e.lock.Unlock()
l := len(e.CallTrace)
if l == 0 {
return
return nil
}
e.CallTrace = e.CallTrace[:l-1]
return e
}
// ToGoError returns original error message.

Loading…
Cancel
Save