mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-13 06:15:33 +00:00
Only print backtrace if frames are detected
This commit is contained in:
parent
614b3b9918
commit
adada7e751
@ -230,6 +230,7 @@ extern "C" fn signal_trap_handler(
|
|||||||
unwind_result = Box::new(image);
|
unwind_result = Box::new(image);
|
||||||
} else {
|
} else {
|
||||||
use colored::*;
|
use colored::*;
|
||||||
|
if es_image.frames.len() > 0 {
|
||||||
eprintln!(
|
eprintln!(
|
||||||
"\n{}",
|
"\n{}",
|
||||||
"Wasmer encountered an error while running your WebAssembly program."
|
"Wasmer encountered an error while running your WebAssembly program."
|
||||||
@ -238,6 +239,8 @@ extern "C" fn signal_trap_handler(
|
|||||||
);
|
);
|
||||||
es_image.print_backtrace_if_needed();
|
es_image.print_backtrace_if_needed();
|
||||||
}
|
}
|
||||||
|
// Just let the error propagate otherrwise
|
||||||
|
}
|
||||||
|
|
||||||
true
|
true
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user