Improved exceptions and reporting exceptions for command-line compiler.

combine into single line, remove braces