Class bad_request

Inheritance Relationships

Base Type

Class Documentation

class bad_request : public CE::Exceptions::runtime_exception

A request violates the receiving operation’s state, range or ownership rules.

Consult that operation for valid inputs and preserved state. Constructors retain diagnostic text without throwing; their caller arguments must still be evaluated before entry.

Public Functions

bad_request(const char *location_, uint32_t line_, const char *info_) 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.

  • info_ – Detail copied during construction; null C strings append no detail. Embedded NUL in the string overload ends the copied detail. 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.

inline bad_request(const char *location_, uint32_t line_, const std::string &info_) 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.

  • info_ – Detail copied during construction; null C strings append no detail. Embedded NUL in the string overload ends the copied detail. 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.