Merge branch 'backtrace' into 'master'

Log backtrace in panic hook in Voxygen

See merge request veloren/veloren!139

Former-commit-id: 14c53ea6eaf57dbd2acf743f7b47a9916f3615fe
This commit is contained in:
Joshua Barretto 2019-05-14 08:01:08 +00:00
commit 090247c20c
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);