Panic protection in Tonic (more generally for tower-based services) #885
Answered
by
LucioFranco
EarvinKayonga
asked this question in
Q&A
-
So I am looking for a way to handle panics gracefully. This doesn't work. Do you have other suggestions ?
|
Beta Was this translation helpful? Give feedback.
Answered by
LucioFranco
Jan 12, 2022
Replies: 1 comment 1 reply
-
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. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
EarvinKayonga
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.