make the panic message more useful (#437)

when panic happend, previouse panic info:
panic occurred: PanicHookInfo { payload: Any { .. }, location: Location { file: "easytier/src/easytier-core.rs", line: 680, col: 9 }, can_unwind: true, force_no_backtrace: false }

the new panic info:

panic occurred: payload:launcher error: "anyhow error: failed to add listener tcp://0.0.0.0:11010", location: Some(Location { file: "easytier/src/easytier-core.rs", line: 680, col: 9 })
backtrace saved to easytier-panic.log
This commit is contained in:
Jiangqiu Shen
2024-10-25 13:33:04 -04:00
committed by GitHub
parent 1ac2e1c8e3
commit 18da94bf33
4 changed files with 27 additions and 1 deletions

View File

@@ -120,3 +120,8 @@ core_clap:
ipv6_listener:
en: "the url of the ipv6 listener, e.g.: tcp://[::]:11010, if not set, will listen on random udp port"
zh-CN: "IPv6 监听器的URL例如tcp://[::]:11010如果未设置将在随机UDP端口上监听"
core_app:
panic_backtrace_save:
en: "backtrace saved to easytier-panic.log"
zh-CN: "回溯信息已保存到easytier-panic.log"