Seafire-Server/seafire/server/error-handler.hxx

39 lines
716 B
C++
Raw Permalink Normal View History

2025-03-07 02:25:54 +01:00
#ifndef seafire__server__error_handler_hxx_
#define seafire__server__error_handler_hxx_
#include <seafire/server/common-error.hxx>
namespace seafire::server
{
class request_t;
class response_t;
class error_handler_t
{
public:
virtual
void
on_error(request_t&, response_t&, common_error_t) = 0;
virtual
void
on_exception(request_t&, response_t&) noexcept = 0;
protected:
error_handler_t();
error_handler_t(error_handler_t const&) = delete;
error_handler_t(error_handler_t&&) = delete;
~error_handler_t() noexcept;
error_handler_t& operator=(error_handler_t const&) = delete;
error_handler_t& operator=(error_handler_t&&) = delete;
};
}
#endif