TakeError returns the current error and resets the error state
()
| 136 | |
| 137 | // TakeError returns the current error and resets the error state |
| 138 | func (c *ReadContext) TakeError() Error { |
| 139 | e := c.err |
| 140 | c.err = Error{} |
| 141 | return e |
| 142 | } |
| 143 | |
| 144 | // CheckError checks if an error has occurred and returns it as a standard error |
| 145 | // This is used at strategic points for deferred error checking |