Skip to content

Commit

Permalink
fix: cannot catch error before run
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed Jan 20, 2019
1 parent 9cb6520 commit 4befa90
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/AbstractApplication.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ public function __construct(array $config = [], Input $input = null, Output $out
}

/**
*
* @throws \InvalidArgumentException
*/
protected function init()
Expand All @@ -128,6 +127,10 @@ protected function init()
'endMemory' => 0,
];

if (!$this->errorHandler) {
$this->errorHandler = new ErrorHandler();
}

$this->registerErrorHandle();
}

Expand Down Expand Up @@ -159,10 +162,6 @@ protected function prepareRun()
Style::setNoColor();
}

if (!$this->errorHandler) {
$this->errorHandler = new ErrorHandler();
}

// date_default_timezone_set($this->config('timeZone', 'UTC'));
// new AutoCompletion(array_merge($this->getCommandNames(), $this->getControllerNames()));
}
Expand Down

0 comments on commit 4befa90

Please sign in to comment.