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

Original commit: a802e7fb71
This commit is contained in:
Alexander Udalov
2017-04-21 14:52:24 +03:00
parent 2b630b38ab
commit c27636cf3a
8 changed files with 82 additions and 0 deletions