Skip to content

Panic protection in Tonic (more generally for tower-based services) #885

Answered by LucioFranco
EarvinKayonga asked this question in Q&A
Discussion options

You must be logged in to vote

We tend to just have a panic handler for the entire application (usually to print the message to our logging system). Panics should not be used for regular error handling like this. In tokio the panic will catch and just cancel the task.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@EarvinKayonga
Comment options

Answer selected by EarvinKayonga
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants