better-panic

Crates.iobetter-panic
lib.rsbetter-panic
version0.3.0
sourcesrc
created_at2019-06-20 17:15:54.145859
updated_at2022-01-15 20:28:21.605344
descriptionPretty panic backtraces inspired by Python's tracebacks.
homepage
repositoryhttps://github.com/mitsuhiko/better-panic
max_upload_size
id142366
size434,709
Armin Ronacher (mitsuhiko)

documentation

README

better-panic

Build Status Crates.io License rustc 1.42.0 Documentation

better-panic gives you pretty backtraces for panics.

It is inspired by Python tracebacks and tries to replicate them as well as possible. This is what it looks like:

Some of the code is based on the color-backtrace library.

Usage

The most common way to use it is to invoke the install function which installs a panic handler. In debug builds the backtrace is shown automatically, in release builds it's hidden by default.

better_panic::install();

For more configuration see the Settings object.

Features

  • Colorize backtraces to be easier on the eyes
  • Show source snippets if source files are found on disk
  • Hide all the frames after the panic was already initiated

License and Links

Commit count: 17

cargo fmt