Skip to content

Commit

Permalink
Fix Java stack trace parsing when there are new lines in exception me…
Browse files Browse the repository at this point in the history
…ssage (#96)
  • Loading branch information
SweetVishnya authored Jul 11, 2023
1 parent ea7e534 commit c1067b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libcasr/src/java.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ impl ParseStacktrace for JavaStacktrace {
conv_counter: usize,
}
// Get java stack trace.
let re = Regex::new(r"(?m)^(?:Caused by:|Exception in thread|== Java Exception:).*((?:\n(?:\s|\t)+at .*\(.*\))*)(?:\n(?:\s|\t)+\.\.\. (\d+) more)?").unwrap();
let re = Regex::new(r"(?m)^(?:Caused by:|Exception in thread|== Java Exception:)(?:.|\n)*?((?:\n(?:\s|\t)+at .*\(.*\))+)(?:\n(?:\s|\t)+\.\.\. (\d+) more)?").unwrap();
let mut blocks = Vec::new();
for cap in re.captures_iter(stream) {
let body: Vec<&'_ str> = cap
Expand Down

0 comments on commit c1067b9

Please sign in to comment.