Skip to content

Commit

Permalink
Merge pull request #1480 from jplag/feature/printSubmissionNamesOnAnt…
Browse files Browse the repository at this point in the history
…lrException

Changed AbstractAntlrParserAdapter to catch all exceptions during par…
  • Loading branch information
tsaglam authored Feb 2, 2024
2 parents 4e86c16 + 876a676 commit 39ddae7
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package de.jplag.antlr;

import java.io.File;
import java.io.IOException;
import java.io.Reader;
import java.util.List;
import java.util.Set;
Expand Down Expand Up @@ -69,7 +68,7 @@ private void parseFile(File file, TokenCollector collector) throws ParsingExcept
for (ParseTree child : entryContext.children) {
treeWalker.walk(listener, child);
}
} catch (IOException exception) {
} catch (Exception exception) { // catching generic exception to capture any exceptions thrown by ANTLR.
throw new ParsingException(file, exception.getMessage(), exception);
}
collector.addFileEndToken();
Expand Down

0 comments on commit 39ddae7

Please sign in to comment.