#chillpill 0.1.0 - like catch_unwind but different

6 messages Β· Page 1 of 1 (latest)

steep jacinth
#

chillpill::catch is a more powerful (but more restrictive) std::panic::catch_unwind. It suppresses the default panic message, and provides access to the source code location (file, line, and column) of the panic. The added restriction is that no code may replace the global panic hook while the function is executing (though modifications before and after are fine).

I originally created this because I wanted to have those two added capabilities for a test framework I'm building. I decided to make it a separate crate for modularity, and publish it in case it helps anyone else with similar needs 😁

Check it out on:

devout cloud
#

Does this handle multithreading?

#

Neat, it does

#

That was the main issue I had when writing a test framework πŸ˜…

#

I went with a different approach in the end - providing a thread local panic hook dispatcher

steep jacinth