mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
Fix to ensure that Addr2Line will not throw unexpected number
formatting exceptions. PR 152853
This commit is contained in:
parent
28f387019d
commit
b2b00e4be1
1 changed files with 5 additions and 1 deletions
|
@ -117,7 +117,11 @@ public class Addr2line {
|
||||||
int colon = line.lastIndexOf(':');
|
int colon = line.lastIndexOf(':');
|
||||||
String number = line.substring(colon + 1);
|
String number = line.substring(colon + 1);
|
||||||
if (!number.startsWith("0")) { //$NON-NLS-1$
|
if (!number.startsWith("0")) { //$NON-NLS-1$
|
||||||
return Integer.parseInt(number);
|
try {
|
||||||
|
return Integer.parseInt(number);
|
||||||
|
} catch(Exception ex) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue