Return `HttpAppFramework` by `setExceptionHandler` (#1866)
This commit is contained in:
parent
830ced8c5b
commit
6b20a9fa8d
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue