original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: create exception message and set it in object
  
  @param Exception $exception
  @return $this
docstring_tokens: create exception message and set it in object