You are here

function flickr_set_error in Flickr 6

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

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

Parameters

$error_message: error message to display

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

File

./flickr.inc, line 415

Code

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