userver: userver/server/handlers/exceptions.hpp File Reference
Loading...
Searching...
No Matches
exceptions.hpp File Reference

Detailed Description

Helpers for throwing exceptions.

Definition in file exceptions.hpp.

Go to the source code of this file.

#include <stdexcept>
#include <string>
#include <unordered_map>
#include <userver/formats/json.hpp>
#include <userver/utils/assert.hpp>
#include <userver/utils/meta_light.hpp>
#include <userver/utils/str_icase.hpp>
#include <userver/utils/void_t.hpp>
+ Include dependency graph for exceptions.hpp:
+ This graph shows which files directly or indirectly include this file:

Classes

struct  server::handlers::HandlerErrorCodeHash
 Hasher class for HandlerErrorCode. More...
 
struct  server::handlers::ServiceErrorCode
 
struct  server::handlers::InternalMessage
 
struct  server::handlers::ExternalBody
 
struct  server::handlers::ExtraHeaders
 
class  server::handlers::CustomHandlerException
 The generic base class for handler exceptions. Thrown exceptions should typically derive from ExceptionWithCode instead. More...
 
class  server::handlers::ExceptionWithCode< Code >
 Base class for handler exceptions. For common HandlerErrorCode values you can use more specific exception classes below. For less common HandlerErrorCode values, this class can be used directly. More...
 
class  server::handlers::ClientError
 
class  server::handlers::RequestParseError
 
class  server::handlers::Unauthorized
 
class  server::handlers::ResourceNotFound
 
class  server::handlers::ConflictError
 
class  server::handlers::InternalServerError
 

Namespaces

namespace  server::handlers
 Most common userver HTTP handlers.
 

Typedefs

using server::handlers::Headers
 

Enumerations

enum class  server::handlers::HandlerErrorCode {
  server::handlers::kUnknownError ,
  server::handlers::kClientError ,
  server::handlers::kRequestParseError ,
  server::handlers::kUnauthorized ,
  server::handlers::kForbidden ,
  server::handlers::kResourceNotFound ,
  server::handlers::kInvalidUsage ,
  server::handlers::kNotAcceptable ,
  server::handlers::kConflictState ,
  server::handlers::kPayloadTooLarge ,
  server::handlers::kTooManyRequests ,
  server::handlers::kServerSideError ,
  server::handlers::kBadGateway ,
  server::handlers::kGatewayTimeout ,
  server::handlers::kUnsupportedMediaType
}
 

Functions

std::string_view server::handlers::GetCodeDescription (HandlerErrorCode)
 
std::string_view server::handlers::GetFallbackServiceCode (HandlerErrorCode)