proxygen
|
#include <Format.h>
Public Member Functions | |
FormatKeyNotFoundException (StringPiece key) | |
char const * | key () const noexcept |
Static Private Attributes | |
static constexpr StringPiece const | kMessagePrefix = "format key not found: " |
Exception class thrown when a format key is not found in the given associative container keyed by strings. We inherit std::out_of_range for compatibility with callers that expect exception to be thrown directly by std::map or std::unordered_map.
Having the key be at the end of the message string, we can access it by simply adding its offset to what(). Not storing separate std::string key makes the exception type small and noexcept-copyable like std::out_of_range, and therefore able to fit in-situ in exception_wrapper.
|
explicit |
Definition at line 422 of file Format.cpp.
References kMessagePrefix.
|
inlinenoexcept |
Definition at line 326 of file Format.h.
Referenced by TEST().
|
staticprivate |
Definition at line 331 of file Format.h.
Referenced by FormatKeyNotFoundException().