userver
C++ Async Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
http_error.hpp
Go to the documentation of this file.
1
#pragma once
2
5
6
#include <stdexcept>
7
8
#include <
userver/server/handlers/exceptions.hpp
>
9
#include <
userver/server/http/http_status.hpp
>
10
11
USERVER_NAMESPACE_BEGIN
12
13
namespace
server::http
{
14
23
HttpStatus
GetHttpStatus
(
handlers::HandlerErrorCode
)
noexcept
;
24
28
HttpStatus
GetHttpStatus
(
const
handlers::CustomHandlerException
& exception)
noexcept
;
29
35
class
CustomHandlerException
:
public
handlers::CustomHandlerException
{
36
public
:
40
template
<
typename
... Args>
41
CustomHandlerException
(
handlers::HandlerErrorCode
error_code,
HttpStatus
http_status, Args&&... args)
42
:
handlers
::
CustomHandlerException
(error_code,
std
::forward<Args>(args)...),
43
http_status_(http_status)
44
{}
45
46
HttpStatus
GetHttpStatus
()
const
{
return
http_status_; }
47
48
private
:
49
HttpStatus
http_status_;
50
};
51
52
}
// namespace server::http
53
54
USERVER_NAMESPACE_END
userver
server
http
http_error.hpp
Generated on
for userver by
Doxygen
1.17.0