Return `HttpAppFramework` by `setExceptionHandler` (#1866)

This commit is contained in:
Muhammad 2023-11-27 12:43:56 +03:00 committed by GitHub
parent 830ced8c5b
commit 6b20a9fa8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -1532,7 +1532,7 @@ class DROGON_EXPORT HttpAppFramework : public trantor::NonCopyable
/**
* @brief handler will be called upon an exception escapes a request handler
*/
virtual void setExceptionHandler(ExceptionHandler handler) = 0;
virtual HttpAppFramework &setExceptionHandler(ExceptionHandler handler) = 0;
/**
* @brief returns the excaption handler

View File

@ -657,9 +657,10 @@ class HttpAppFrameworkImpl final : public HttpAppFramework
return reusePort_;
}
void setExceptionHandler(ExceptionHandler handler) override
HttpAppFramework &setExceptionHandler(ExceptionHandler handler) override
{
exceptionHandler_ = std::move(handler);
return *this;
}
const ExceptionHandler &getExceptionHandler() const override