We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8f7ad95 commit 343c542Copy full SHA for 343c542
src/0x04/pkg/lib/src/macros.rs
@@ -17,20 +17,20 @@ macro_rules! entry {
17
fn panic(info: &core::panic::PanicInfo) -> ! {
18
let location = if let Some(location) = info.location() {
19
alloc::format!(
20
- "{}:{}:{}",
+ "{}@{}:{}",
21
location.file(),
22
location.line(),
23
location.column()
24
)
25
} else {
26
"Unknown location".to_string()
27
};
28
- let msg = if let Some(msg) = info.message() {
29
- alloc::format!("{}", msg)
30
- } else {
31
- "No more message...".to_string()
32
- };
33
- errln!("\n\n\rERROR: panicked at {}\n\n\r{}", location, msg);
+
+ errln!(
+ "\n\n\rERROR: panicked at {}\n\n\r{}",
+ location,
+ info.message()
+ );
34
35
// FIXME: after syscall, add lib::sys_exit(1);
36
loop {}
0 commit comments