userver: userver/server/http/http_error.hpp Source File
Loading...
Searching...
No Matches
http_error.hpp
Go to the documentation of this file.
1#pragma once
2
5
6#include <stdexcept>
7
10
11USERVER_NAMESPACE_BEGIN
12
13namespace server::http {
14
24
29
36public:
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
48private:
49 HttpStatus http_status_;
50};
51
52} // namespace server::http
53
54USERVER_NAMESPACE_END