49 auto*
end = digits +
sizeof digits;
57 *--at =
static_cast<char>(
'0' +
limit % 10);
66 std::string message(prefix);
76 " distinct order ids in one run; reuse ids, e.g. build the id from a modulo of bar_index");
79 " retired order-id keys in one run (each retired order uses 2); reuse ids, e.g. a modulo of bar_index");
82 " keys for partially filled exits in one run; reuse ids, e.g. a modulo of bar_index");
85 " exit rank ids in one run; reuse ids");
88 " keys in one run; reuse ids");
96 " bytes in one run; use shorter ids or reuse ids");
99 " bytes in one run; use shorter ids or reuse ids");
102 " bytes in one run; use shorter ids or reuse ids");
105 " bytes in one run; use shorter ids or reuse ids");
108 " bytes in one run; use shorter ids or reuse ids");
114 " order ids active at once (placed and not yet closed or cancelled); "
115 "close or cancel orders sooner, or reuse ids");
122 " store objects live at once; ");
124 message +=
" is the most allowed in this store; attempted live count ";
126 message +=
", approved maximum ";
134 const char* operation =
"scratch capacity exceeded")
135 :
std::runtime_error(operation),
139 :
std::runtime_error(message),
149 :
std::system_error(error,
std::generic_category(), operation),
152 :
std::system_error(error),
RunFailureInfo(RunFailureCode code, const RunFailureArgs &args) noexcept
AuxiliaryScratchIoError(const std::system_error &error)
AuxiliaryScratchIoError(int error, const char *operation)
ScratchCapacityError(ScratchResource resource, const std::string &message)
ScratchCapacityError(ScratchResource resource, const char *operation="scratch capacity exceeded")
std::string scratch_object_limit_message(std::uint64_t limit, std::uint64_t live, std::uint64_t cap)
std::string scratch_count_limit_message(ScratchResource resource, std::uint64_t limit)
std::string scratch_byte_limit_message(ScratchResource resource, std::uint64_t limit)
std::string scratch_limit_message(const char *prefix, std::uint64_t limit, const char *suffix)
const char * scratch_resource_name(ScratchResource resource) noexcept
void raise_scratch_io_error(int error, const char *operation)
std::string scratch_limit_number(std::uint64_t limit)
std::string scratch_resident_cohort_limit_message(std::uint64_t limit)
@ scratch_capacity_exceeded