protected function _addException(Exception $exception)
    {
        $this->_hasErrors = true;
        $this->_errorsList[$exception->getCode()] = [
            'message'   => $exception->getMessage(),
            'line'      => $exception->getLine(),
            'file'      => $exception->getFile(),
            'trace'     => $exception->getTraceAsString(),
        ];

        return $this;
    }
protected function _addException(Exception $exception)
    {
        $this->_hasErrors = true;
        $this->_errorsList[$exception->getCode()] = [
            'message'   => $exception->getMessage(),
            'line'      => $exception->getLine(),
            'file'      => $exception->getFile(),
            'trace'     => $exception->getTraceAsString(),
        ];

        return $this;
    }
protected function _addException ( Exception $ exception ) { $ this -> _hasErrors = true ; $ this -> _errorsList [ $ exception -> getCode ( ) ] = [ 'message' => $ exception -> getMessage ( ) , 'line' => $ exception -> getLine ( ) , 'file' => $ exception -> getFile ( ) , 'trace' => $ exception -> getTraceAsString ( ) , ] ; return $ this ; }
create exception message and set it in object

@param Exception $exception
@return $this
create exception message and set it in object