HandleAsAssertionFailure hides an error and turns it into an assertion failure. Both details from the original error and the context of the caller are preserved. The original error is not visible as cause any more. The original error message is preserved. See the doc of `AssertionFailedf()` for more
(origErr error)
| 178 | // visible as cause any more. The original error message is preserved. |
| 179 | // See the doc of `AssertionFailedf()` for more details. |
| 180 | func HandleAsAssertionFailure(origErr error) error { |
| 181 | return errutil.HandleAsAssertionFailureDepth(1, origErr) |
| 182 | } |
| 183 | |
| 184 | // HandleAsAssertionFailureDepth is like HandleAsAssertionFailure but |
| 185 | // the depth at which the call stack is captured can be specified. |
nothing calls this directly
no test coverage detected
searching dependent graphs…