diff --git a/doc/82-Changelog.md b/doc/82-Changelog.md index ea993fa3..64c6fc73 100644 --- a/doc/82-Changelog.md +++ b/doc/82-Changelog.md @@ -28,6 +28,7 @@ v1.10.0 (unreleased) * FIX: config deploy doesn't try to wait in case of no deployment (#2522) * FEATURE: improved wording for deployment error messages (#2523) * FEATURE: JSON can now be shipped via STDIN (#1570) +* FEATURE: improved readability for some error messages (#2567) 1.9.1 ----- diff --git a/library/Director/Cli/Command.php b/library/Director/Cli/Command.php index 79a3377e..69d61b1d 100644 --- a/library/Director/Cli/Command.php +++ b/library/Director/Cli/Command.php @@ -38,6 +38,10 @@ class Command extends CliCommand } } + /** + * @param string $msg + * @return never-return + */ public function fail($msg) { $args = func_get_args(); @@ -45,8 +49,8 @@ class Command extends CliCommand if (count($args)) { $msg = vsprintf($msg, $args); } - - throw new RuntimeException($msg); + echo $this->screen->colorize("ERROR", 'red') . ": $msg\n"; + exit(1); } /**