add backtrace to panic hook

Former-commit-id: c831dfa85ebfa1ace05e5ffdec5cc68954394ae1
This commit is contained in:
Imbris 2019-05-14 03:41:27 -04:00 committed by Joshua Barretto
parent 85e97e16d3
commit 8b97ee14bc
3 changed files with 7 additions and 1 deletions

1
Cargo.lock generated
View File

@ -2350,6 +2350,7 @@ dependencies = [
name = "veloren-voxygen"
version = "0.2.0"
dependencies = [
"backtrace 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
"config 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)",
"conrod_core 0.63.0 (git+https://gitlab.com/veloren/conrod.git)",
"conrod_winit 0.63.0 (git+https://gitlab.com/veloren/conrod.git)",

View File

@ -48,3 +48,4 @@ msgbox = "0.1"
directories = "1.0"
portpicker = "0.1"
num = "0.2"
backtrace = "0.3"

View File

@ -138,7 +138,11 @@ The information below is intended for developers and testers.
Panic Payload: {:?}
PanicInfo: {}", settings_clone.log.file, reason, panic_info);
log::error!("VOXYGEN HAS PANICKED\n\n{}", msg);
log::error!(
"VOXYGEN HAS PANICKED\n\n{}\n\nBacktrace:\n{:?}",
msg,
backtrace::Backtrace::new()
);
msgbox::create("Voxygen has panicked", &msg, msgbox::IconType::ERROR);