MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / setErr

Method setErr

asyncbuffer/buffer.go:312–321  ·  view source on GitHub ↗
(err error)

Source from the content-addressed store, hash-verified

310}
311
312func (ab *AsyncBuffer) setErr(err error) {
313 if err == nil {
314 return
315 }
316
317 // If the error is already set, we do not overwrite it
318 if ab.err.Load() == nil {
319 ab.err.Store(errctx.WrapWithStackSkip(err, 1))
320 }
321}
322
323// addChunk adds a new chunk to the AsyncBuffer, increments bytesRead
324// and signals that a chunk is ready

Callers 1

readChunksMethod · 0.95

Calls 2

WrapWithStackSkipFunction · 0.92
LoadMethod · 0.80

Tested by

no test coverage detected