newLocationError constructs a new Locationer error from the supplied error with the location set to callDepth in the stack. If a nill error is provided to this function then a new empty error is constructed.
(err error, callDepth int)
| 56 | // with the location set to callDepth in the stack. If a nill error is provided |
| 57 | // to this function then a new empty error is constructed. |
| 58 | func newLocationError(err error, callDepth int) *locationError { |
| 59 | le := &locationError{error: err} |
| 60 | le.function, le.line = getLocation(callDepth + 1) |
| 61 | return le |
| 62 | } |
| 63 | |
| 64 | // Error implementes the error interface. |
| 65 | func (l *locationError) Error() string { |
no test coverage detected
searching dependent graphs…