Add null checks for error trace fields in SysErrorTransformer to prevent null values
This commit is contained in:
parent
78f713e4c1
commit
6e80beda14
1 changed files with 4 additions and 4 deletions
|
|
@ -67,10 +67,10 @@ public class SysErrorTransformer {
|
|||
while (matcher.find()) {
|
||||
SysErrorTraceItem item = new SysErrorTraceItem();
|
||||
|
||||
item.setFile(matcher.group(2));
|
||||
item.setLine(Integer.parseInt(matcher.group(3)));
|
||||
item.setMethod(matcher.group(1));
|
||||
item.setFullPath("at " + matcher.group(1));
|
||||
item.setFile(matcher.group(2) == null ? "na" : matcher.group(2));
|
||||
item.setLine(Integer.parseInt(matcher.group(3) == null ? "0" : matcher.group(3)));
|
||||
item.setMethod(matcher.group(1) == null ? "na" : matcher.group(1));
|
||||
item.setFullPath("at " + (matcher.group(1) == null ? "na" : matcher.group(1)));
|
||||
|
||||
items.add(item);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue