15 inline ClientErrorException::ClientErrorException (
Status status,
const String& reason)
16 : inherited{status, reason}
18 Require (400 <= status and status < 500);
20 inline ClientErrorException::ClientErrorException (
const String& reason)
21 : ClientErrorException{StatusCodes::kBadRequest, reason}
24 template <invocable FUNCTION,
typename RESULT_TYPE>
25 inline RESULT_TYPE ClientErrorException::TreatExceptionsAsClientError (FUNCTION&& f)
28 return forward<FUNCTION> (f) ();
31 Execution::ReThrow ();
34 using namespace Characters;
35 DbgTrace (
"Translating exception {} to ClientErrorException"_f, current_exception ());
ClientErrorException is to capture exceptions caused by a bad (e.g ill-formed) request.