MCPcopy Create free account
hub / github.com/apache/fory / SetError

Method SetError

go/fory/writer.go:131–135  ·  view source on GitHub ↗

SetError sets the error state if no error has occurred yet (first error wins)

(e Error)

Source from the content-addressed store, hash-verified

129
130// SetError sets the error state if no error has occurred yet (first error wins)
131func (c *WriteContext) SetError(e Error) {
132 if c.err.Ok() {
133 c.err = e
134 }
135}
136
137// TakeError returns the current error and resets the error state
138func (c *WriteContext) TakeError() Error {

Callers 3

WriteLengthMethod · 0.95
WriteBufferObjectMethod · 0.95
WriteValueMethod · 0.95

Calls 1

OkMethod · 0.80

Tested by

no test coverage detected