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

Method set_buffer_out_of_bound

cpp/fory/util/error.h:233–239  ·  view source on GitHub ↗

Set buffer out of bound error (common case optimization).

Source from the content-addressed store, hash-verified

231
232 /// Set buffer out of bound error (common case optimization).
233 void set_buffer_out_of_bound(size_t offset, size_t length, size_t capacity) {
234 ok_ = false;
235 state_.reset(new ErrorState(
236 ErrorCode::BufferOutOfBound,
237 "Buffer out of bound: " + std::to_string(offset) + " + " +
238 std::to_string(length) + " > " + std::to_string(capacity)));
239 }
240
241 /// reset to OK state.
242 void reset() {

Callers 5

read_varint_at_checkedFunction · 0.80
ensure_offset_readableFunction · 0.80
reader_indexMethod · 0.80
read_var_uint64Method · 0.80
fill_bufferMethod · 0.80

Calls 1

resetMethod · 0.65

Tested by

no test coverage detected