Improved exceptions and reporting exceptions for command-line compiler.

This is peer to peer review, so its your decision.