src/PhpConsole/Handler.php
public function handleException($exception) {
		if(!$this->isStarted || $this->isHandlingDisabled()) {
			return;
		}
		try {
			$this->onHandlingStart();
			$this->connector->getErrorsDispatcher()->dispatchException($exception);
			if($this->oldExceptionsHandler && $this->callOldHandlers) {
				call_user_func($this->oldExceptionsHandler, $exception);
			}
		}
		catch(\Throwable $internalException) {
			$this->handleException($internalException);
		}
		catch(\Exception $internalException) {
			$this->handleException($internalException);
		}
		$this->onHandlingComplete();
	}
public function handleException($exception) {
		if(!$this->isStarted || $this->isHandlingDisabled()) {
			return;
		}
		try {
			$this->onHandlingStart();
			$this->connector->getErrorsDispatcher()->dispatchException($exception);
			if($this->oldExceptionsHandler && $this->callOldHandlers) {
				call_user_func($this->oldExceptionsHandler, $exception);
			}
		}
		catch(\Throwable $internalException) {
			$this->handleException($internalException);
		}
		catch(\Exception $internalException) {
			$this->handleException($internalException);
		}
		$this->onHandlingComplete();
	}
public function handleException ( $ exception ) { if ( ! $ this -> isStarted || $ this -> isHandlingDisabled ( ) ) { return ; } try { $ this -> onHandlingStart ( ) ; $ this -> connector -> getErrorsDispatcher ( ) -> dispatchException ( $ exception ) ; if ( $ this -> oldExceptionsHandler && $ this -> callOldHandlers ) { call_user_func ( $ this -> oldExceptionsHandler , $ exception ) ; } } catch ( \ Throwable $ internalException ) { $ this -> handleException ( $ internalException ) ; } catch ( \ Exception $ internalException ) { $ this -> handleException ( $ internalException ) ; } $ this -> onHandlingComplete ( ) ; }
Handle exception object
@param \Exception|\Throwable $exception
Handle exception object