Trapping NumberFormatExceptionsgenerated by unusual error messages from the C compiler.

This commit is contained in:
David A. Mellis 2006-02-25 16:50:29 +00:00
parent 52820102f5
commit 8d70cfe27b
1 changed files with 7 additions and 1 deletions

View File

@ -534,7 +534,13 @@ public class Compiler implements MessageConsumer {
return;
}
int lineNumber = Integer.parseInt(s1.substring(0, colon));
int lineNumber;
try {
lineNumber = Integer.parseInt(s1.substring(0, colon));
} catch (NumberFormatException e) {
System.err.print(s1);
return;
}
// the "1" corresponds to the amount of lines written to the main code
// file by PdePreprocessor's writeHeader() routine before prototypes