aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index cce55354..a1c8e77c 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -52,12 +52,20 @@ fn main() {
// Run alacritty
if let Err(err) = run(config, options) {
- die!("{}", err);
+ die!("Alacritty encountered an unrecoverable error:\n\n\t{}\n", Red(err));
}
println!("Goodbye");
}
+use std::fmt;
+struct Red<T>(T);
+impl<T: fmt::Display> fmt::Display for Red<T> {
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ write!(f, "\x1b[31m{}\x1b[0m", self.0)
+ }
+}
+
/// Run Alacritty
///
/// Creates a window, the terminal state, pty, I/O event loop, input processor,