You are here

function flickr_set_error in Flickr 5

Same name and namespace in other branches
  1. 6 flickr.inc \flickr_set_error()
  2. 7 flickr.inc \flickr_set_error()

Display an error message to flickr administrators and write an error to watchdog.

Parameters

$mesageOrResposne: message or error response to display

1 call to flickr_set_error()
flickr_request in ./flickr.inc
Submit a request to Flickr.

File

./flickr.inc, line 524

Code

function flickr_set_error($messageOrResponse) {
  if (is_array($messageOrResponse)) {
    $message = t('Flickr error @error_id: %flickr_error', array(
      '@error_id' => $messageOrResponse['code'],
      '%flickr_error' => $messageOrResponse['message'],
    ));
  }
  else {
    $message = $messageOrResponse;
  }
  if (user_access('administer flickr')) {
    drupal_set_message($message, 'error');
  }
  watchdog('flickr', $message, WATCHDOG_WARNING);
}