From ba30f06c0ad3d26d9fc56debd6e46cc4a68adb81 Mon Sep 17 00:00:00 2001 From: inhere Date: Fri, 29 Mar 2019 13:59:45 +0800 Subject: [PATCH] fix: error handle bug --- .gitignore | 1 + CHANGELOG.md | 8 ++++++++ src/Base/AbstractApplication.php | 8 ++++---- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 34a272a..c8e1612 100644 --- a/.gitignore +++ b/.gitignore @@ -14,5 +14,6 @@ composer.lock *.swo *.zip *.phar +*.cache .DS_Store .interactive_history diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b5c997..9adba06 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # CHANGELOG +## v2.4.1 - v2.4.3 + +> publish at: 2019.03.29 + +- fix: no add error handle before use +- fix some bugs +- update some + ## v2.4.0 > publish at: 2018.07.03 diff --git a/src/Base/AbstractApplication.php b/src/Base/AbstractApplication.php index 4d97957..b787e90 100644 --- a/src/Base/AbstractApplication.php +++ b/src/Base/AbstractApplication.php @@ -126,6 +126,10 @@ protected function init() 'endMemory' => 0, ]; + if (!$this->errorHandler) { + $this->errorHandler = new ErrorHandler(); + } + $this->commandName = $this->input->getCommand(); $this->registerErrorHandle(); @@ -145,10 +149,6 @@ public static function getInternalOptions(): array protected function prepareRun() { - if (!$this->errorHandler) { - $this->errorHandler = new ErrorHandler(); - } - // date_default_timezone_set($this->config('timeZone', 'UTC')); //new AutoCompletion(array_merge($this->getCommandNames(), $this->getControllerNames())); }