Skip to main content
summaryrefslogtreecommitdiffstats
path: root/xlc
diff options
context:
space:
mode:
authorChris Recoskie2008-01-25 15:10:07 +0000
committerChris Recoskie2008-01-25 15:10:07 +0000
commitae24fb2fced8f906aab03d69bc717b2cc9ba4b50 (patch)
tree5097d1d0466233f8db5dc739217ca82612fff936 /xlc
parent290c7897927ea7c9a221e2bce474652a538aef46 (diff)
downloadorg.eclipse.cdt-ae24fb2fced8f906aab03d69bc717b2cc9ba4b50.tar.gz
org.eclipse.cdt-ae24fb2fced8f906aab03d69bc717b2cc9ba4b50.tar.xz
org.eclipse.cdt-ae24fb2fced8f906aab03d69bc717b2cc9ba4b50.zip
Fixing NumberFormatException when make outputs an error and the XL error parser tries to handle it.
Diffstat (limited to 'xlc')
-rw-r--r--xlc/org.eclipse.cdt.errorparsers.xlc/src/org/eclipse/cdt/errorparsers/xlc/XlcErrorParser.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/xlc/org.eclipse.cdt.errorparsers.xlc/src/org/eclipse/cdt/errorparsers/xlc/XlcErrorParser.java b/xlc/org.eclipse.cdt.errorparsers.xlc/src/org/eclipse/cdt/errorparsers/xlc/XlcErrorParser.java
index 49eaa0f2731..af236b05070 100644
--- a/xlc/org.eclipse.cdt.errorparsers.xlc/src/org/eclipse/cdt/errorparsers/xlc/XlcErrorParser.java
+++ b/xlc/org.eclipse.cdt.errorparsers.xlc/src/org/eclipse/cdt/errorparsers/xlc/XlcErrorParser.java
@@ -121,7 +121,15 @@ public class XlcErrorParser implements IErrorParser
/* The string that begins after "line " and ends
before '.' operator is the line number. */
lineNum = token.substring(index + 5);
- lineNumber = Integer.parseInt(lineNum);
+
+ // the make utility might actually be the one outputting the error, in which case the string
+ // after the line number will be "make:". In this case we'll get a NumberFormatException.
+ try {
+ lineNumber = Integer.parseInt(lineNum);
+ } catch (NumberFormatException e) {
+ // bail out
+ return false;
+ }
}
else
{

Back to the top