Fix the -message-format command line option.

ErrorManager.setFormat was being called before the command line options
were parsed in handleArgs.  This meant that setFormat was always called
with the default, and so the command line option never took effect.

This option apparently only worked for 2.5 hours on Sep 6 2012 ;-)

Closes #992.
This commit is contained in:
Ewan Mellor 2017-10-29 01:03:07 -07:00
parent 6693ba73a5
commit f2638b290d
No known key found for this signature in database
GPG Key ID: 7CE1C6BC9EC8645D
1 changed files with 4 additions and 1 deletions

View File

@ -191,8 +191,11 @@ public class Tool {
public Tool(String[] args) {
this.args = args;
errMgr = new ErrorManager(this);
errMgr.setFormat(msgFormat);
// We have to use the default message format until we have
// parsed the -message-format command line option.
errMgr.setFormat("antlr");
handleArgs();
errMgr.setFormat(msgFormat);
}
protected void handleArgs() {