You are here

protected function EventHandler::logErrorResult in Services Client 7.2

Log error result from services client operation.

Parameters

ServicesClientEventResult $result: Result of services client operation.

2 calls to EventHandler::logErrorResult()
EntityDeleteHandler::execute in include/event.inc
Execute event and send event to remove endpoint.
EntitySaveHandler::execute in include/event.inc
Execute event and send event to remove endpoint.

File

include/event.inc, line 710

Class

EventHandler
Event handler plugin.

Code

protected function logErrorResult($result) {

  // Don't log loops as this is special error type.
  if (!$result
    ->success() && $result->error_type != ServicesClientErrorType::LOOP) {
    $this
      ->log(ServicesClientLogLevel::ERROR, "ERROR: error_message : @error_message, error_type : @error_type, error_code : @error_code, entity_type : @entity_type, entity_id : @entity_id, uuid : @uuid", array(
      '@error_message' => $result->error_message,
      '@error_type' => !empty($result->error_type) ? ServicesClientErrorType::getTypeName($result->error_type) : ServicesClientErrorType::getTypeName(ServicesClientErrorType::UNKNOWN),
      '@error_code' => !empty($result->error_code) ? $result->error_code : '',
      '@entity_type' => $this->event->entity_type,
      '@entity_id' => $this
        ->getEntityId(),
      '@uuid' => isset($this
        ->getEntity()->uuid) ? $this
        ->getEntity()->uuid : NULL,
    ), WATCHDOG_ERROR);
  }
}