Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
kahuang committed Nov 2, 2022
1 parent ca691bc commit abec66d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cli/src/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::error::Error;
use tracing::error;
use yansi::Paint;

/// A custom context type for Foundry specific error reporting via `eyre`
/// A custom context type for Conduit specific error reporting via `eyre`
#[derive(Debug)]
pub struct Handler;

Expand Down Expand Up @@ -39,25 +39,25 @@ impl EyreHandler for Handler {
}
}

/// Installs the Foundry eyre hook as the global error report hook.
/// Installs the Conduit eyre hook as the global error report hook.
///
/// # Details
///
/// By default a simple user-centric handler is installed, unless
/// `FOUNDRY_DEBUG` is set in the environment, in which case a more
/// `CONDUIT_DEBUG` is set in the environment, in which case a more
/// verbose debug-centric handler is installed.
///
/// Panics are always caught by the more debug-centric handler.
#[cfg_attr(windows, inline(never))]
pub fn install() -> eyre::Result<()> {
let debug_enabled = std::env::var("FOUNDRY_DEBUG").is_ok();
let debug_enabled = std::env::var("CONDUIT_DEBUG").is_ok();

if debug_enabled {
color_eyre::install()?;
} else {
let (panic_hook, _) = color_eyre::config::HookBuilder::default()
.panic_section(
"This is a bug. Consider reporting it at https://github.com/foundry-rs/foundry",
"This is a bug. Consider reporting it at https://github.com/conduit-xyz/conduit-cli",
)
.into_hooks();
panic_hook.install();
Expand Down

0 comments on commit abec66d

Please sign in to comment.