aboutsummaryrefslogtreecommitdiffstats
path: root/src/panic.rs
diff options
context:
space:
mode:
authorJonas Maier <>2026-03-05 08:49:01 +0100
committerJonas Maier <>2026-03-05 08:49:01 +0100
commit9bee39d5bb89f74820b448d3dbb6617c64141ab7 (patch)
treef84892e9d4d72c67244d48423b095f62efe4edb5 /src/panic.rs
parent9e617dde12565ba4e0ec737893b204a5e5271689 (diff)
downloadpish-9bee39d5bb89f74820b448d3dbb6617c64141ab7.tar.gz
doc
Diffstat (limited to 'src/panic.rs')
-rw-r--r--src/panic.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/panic.rs b/src/panic.rs
index 0df0a4e..3ff2167 100644
--- a/src/panic.rs
+++ b/src/panic.rs
@@ -1,3 +1,10 @@
+//! the whole point of this is module such that it is possible
+//! to print the panic while the terminal is in raw mode
+//!
+//! without carriage returns
+//! the content
+//! spills to the right
+
use std::backtrace::{Backtrace, BacktraceStatus};
use std::io::{self, Write};
use std::panic::{self, PanicHookInfo};
@@ -30,7 +37,7 @@ fn panic_hook(info: &PanicHookInfo<'_>) {
BacktraceStatus::Disabled => msg += "no backtrace",
_ => {
msg += &format!("{bt}\n");
- },
+ }
}
// TODO: add link to repo or sth