[][src]Function jane_eyre::install

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::Reports are constructed to prevent the default handler from being installed.

Examples

use color_eyre::eyre::Result;

fn main() -> Result<()> {
    color_eyre::install()?;

    // ...
}