CLI: fix non-XML rendering of argument parse error, simplify code

If the compiler is invoked through JPS, an instance of
XmlMessageRenderer is used and the output should be a valid XML.
Previously, we reported the argument parse error (and the note to try
"-help") before calling messageRenderer.renderPreamble, which resulted
in invalid XML. The same was happening for the usage printed on "-help".
Both of these problems are fixed

 #KT-14848 Fixed
This commit is contained in:
Alexander Udalov
2017-04-21 14:52:24 +03:00
parent a67382fdec
commit a802e7fb71
13 changed files with 135 additions and 53 deletions
View File