36
you are viewing a single comment's thread
view the rest of the comments
[-] sgued@programming.dev 1 points 1 day ago

There are valid reasons to want to catch panics. The N°1 usage of catch_panic are testing tools. But even then, in a low-stakes web server for example, it can make sense to catch panics to return a 500, and it's unlikely that a panic would lead to corrupted state outside of a poisonned mutex, so keeping running can make sense.

this post was submitted on 18 Nov 2026
36 points (100.0% liked)

Rust

8379 readers
30 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 3 years ago
MODERATORS