You are here

function acquia_lift_batch_sync_item in Acquia Lift Connector 7.2

Same name and namespace in other branches
  1. 7 acquia_lift.module \acquia_lift_batch_sync_item()

Wrapper function around acquia_lift_sync_item that catches and logs exceptions thrown.

Parameters

$item: The item to process

&$errors: An array passed by reference to add any errors to.

1 call to acquia_lift_batch_sync_item()
acquia_lift_batch_process_item in ./acquia_lift.batch.inc
Batch API callback to process an API call to Lift.

File

./acquia_lift.module, line 1120
acquia_lift.module Provides Acquia Lift-specific personalization functionality.

Code

function acquia_lift_batch_sync_item($item, &$errors = array()) {
  try {
    acquia_lift_sync_item($item);
  } catch (AcquiaLiftException $e) {
    watchdog('Acquia Lift', 'Could not call the method @method with args @args', array(
      '@method' => $item['method'],
      '@args' => implode(',', $item['args']),
    ));
    $errors[] = $e
      ->getMessage();
  }
}