Function color_eyre::install [−][src]
pub fn install() -> Result<(), Report>
Install the default panic and error report hooks
Details
This function must be called to enable the customization of eyre::Report
provided by color-eyre
. This function should be called early, ideally
before any errors could be encountered.
Only the first install will succeed. Calling this function after another
report handler has been installed will cause an error. Note: This
function must be called before any eyre::Report
s are constructed to
prevent the default handler from being installed.
Installing a global theme in color_spantrace
manually (by calling
color_spantrace::set_theme
or color_spantrace::colorize
before
install
is called) will result in an error if this function is called.
Examples
use color_eyre::eyre::Result; fn main() -> Result<()> { color_eyre::install()?; // ... }