Class bad_alloc

Inheritance Relationships

Base Type

Class Documentation

class bad_alloc : public CE::Exceptions::runtime_exception

Engine backing-allocation failure category.

This derives from runtime_exception, not std::bad_alloc; an operation may also propagate standard allocation exceptions. Constructors retain diagnostic text without throwing; their caller arguments must still be evaluated before entry.

Public Functions

bad_alloc(const char *location_, uint32_t line_) noexcept

Capture owned category/location diagnostics, with a trace when capture/formatting succeeds.

Parameters:
  • location_ – NUL-terminated source location, normally supplied with the line by CE_HERE; null uses an unknown marker.

  • line_ – Source line number. Trace/format/allocation failures inside the constructor use the bounded emergency summary instead of escaping. Input pointers are not retained. This does not log, throw itself, or roll back the failed operation; the caller decides whether to throw the constructed object.