mirror of
https://codeberg.org/icewind/logsmash.git
synced 2026-06-03 18:14:11 +02:00
less fragile backtrace parsing
This commit is contained in:
parent
fea1e1d4de
commit
768c56c447
2 changed files with 3 additions and 2 deletions
|
|
@ -267,7 +267,7 @@ impl FullException {
|
||||||
pub struct Trace {
|
pub struct Trace {
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub file: String,
|
pub file: String,
|
||||||
pub line: LineNumber,
|
pub line: Option<LineNumber>,
|
||||||
pub function: String,
|
pub function: String,
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub class: String,
|
pub class: String,
|
||||||
|
|
|
||||||
|
|
@ -142,7 +142,8 @@ fn trace_line(trace: &Trace, path_prefix_length: usize) -> Row {
|
||||||
.get(path_prefix_length..)
|
.get(path_prefix_length..)
|
||||||
.unwrap_or_default(),
|
.unwrap_or_default(),
|
||||||
),
|
),
|
||||||
Text::from(trace.line.to_string()).alignment(Alignment::Right),
|
Text::from(trace.line.map(|l| l.to_string()).unwrap_or_default())
|
||||||
|
.alignment(Alignment::Right),
|
||||||
Text::from(trace.function().to_string()),
|
Text::from(trace.function().to_string()),
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue