Highlight exceptions/errors in red color

This commit is contained in:
Ivan Kravets
2015-02-20 22:02:38 +02:00
parent 620e5e81c7
commit 5b9504d57a

View File

@ -53,10 +53,12 @@ def main():
except Exception as e: # pylint: disable=W0703
if not isinstance(e, exception.ReturnErrorCode):
maintenance.on_platformio_exception(e)
error_str = "Error: "
if isinstance(e, exception.PlatformioException):
click.echo("Error: " + str(e), err=True)
error_str += str(e)
else:
click.echo(format_exc(), err=True)
error_str += format_exc()
click.secho(error_str, fg="red", err=True)
sys_exit(1)