Closed PureWhiteWu closed 3 weeks ago
Catch panic and handle it is a common need for both http and thrift users.
This PR implements a Service which catches panics and provides a Handler trait for users to handle the panic.
Service
Handler
There's also an example Handler implementation in volo-thrift::server:panic_handler.
volo-thrift::server:panic_handler
Motivation
Catch panic and handle it is a common need for both http and thrift users.
Solution
This PR implements a
Service
which catches panics and provides aHandler
trait for users to handle the panic.There's also an example
Handler
implementation involo-thrift::server:panic_handler
.