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

Method CheckError

go/fory/reader.go:146–151  ·  view source on GitHub ↗

CheckError checks if an error has occurred and returns it as a standard error This is used at strategic points for deferred error checking

()

Source from the content-addressed store, hash-verified

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
146func (c *ReadContext) CheckError() error {
147 if c.err.HasError() {
148 return c.TakeError()
149 }
150 return nil
151}
152
153func (c *ReadContext) readExpectedTypeID(expected TypeId) bool {
154 actual := TypeId(c.buffer.ReadUint8(c.Err()))

Calls 2

TakeErrorMethod · 0.95
HasErrorMethod · 0.45