mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-26 11:12:41 +03:00
Revert "Improve panic logging" (#4144)
This reverts commit 345b983c8e
.
This seems to have caused only the first line of panics to be reported
in production builds.
Release Notes:
- (Added|Fixed|Improved) ...
([#<public_issue_number_if_exists>](https://github.com/zed-industries/community/issues/<public_issue_number_if_exists>)).
This commit is contained in:
commit
f8081edd56
@ -544,22 +544,7 @@ fn init_panic_hook(app: &App, installation_id: Option<String>, session_id: Strin
|
||||
let mut backtrace = backtrace
|
||||
.frames()
|
||||
.iter()
|
||||
.flat_map(|frame| {
|
||||
frame.symbols().iter().filter_map(|symbol| {
|
||||
let name = symbol.name()?;
|
||||
let addr = symbol.addr()? as usize;
|
||||
let position = if let (Some(path), Some(lineno)) = (
|
||||
symbol.filename().and_then(|path| path.file_name()),
|
||||
symbol.lineno(),
|
||||
) {
|
||||
format!("{}:{}", path.to_string_lossy(), lineno)
|
||||
} else {
|
||||
"?".to_string()
|
||||
};
|
||||
|
||||
Some(format!("{:} ({:#x}) at {}", name, addr, position))
|
||||
})
|
||||
})
|
||||
.filter_map(|frame| Some(format!("{:#}", frame.symbols().first()?.name()?)))
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
// Strip out leading stack frames for rust panic-handling.
|
||||
|
Loading…
Reference in New Issue
Block a user