getError() public method

The error/exception message if the operation encountered issues.
public getError ( ) : null | string
return null | string
 /**
  * {@inheritdoc}
  */
 public function end(LogOperation $operation)
 {
     if (!is_null($operation->getError())) {
         $this->errors[] = $operation;
     }
 }
 /**
  * @param LogOperation $log
  * @return string
  */
 protected function getLogMessage(LogOperation $log)
 {
     $startOrStop = is_null($log->getStopTime()) ? 'Start' : 'End';
     $message = "(" . $log->getDomain() . " on " . $log->getOperation()->getServer() . ") {$startOrStop} " . $log->getOperation()->getName() . " Operation - ";
     $params = [];
     if (is_null($log->getStopTime())) {
         foreach ($log->getOperation()->getLogArray() as $key => $value) {
             if ($key != "Server") {
                 $params[] = "{$key}: {$value}";
             }
         }
     } else {
         if (!is_null($log->getError())) {
             $params[] = "Error: " . $log->getError();
         }
         $params[] = "Completed in " . round(($log->getStopTime() - $log->getStartTime()) * 1000) . " ms.";
     }
     $message .= implode(', ', $params);
     return $message;
 }