You are here

function gathercontent_error_return in GatherContent 7

GatherContent API error handling.

1 call to gathercontent_error_return()
gathercontent_get_command in ./gathercontent.module
Connecting to the GatherContent API. Data retrieved as JSON.

File

./gathercontent.module, line 351
Imports pages from GatherContent (http://gathercontent.com/) into Drupal as nodes.

Code

function gathercontent_error_return($msg) {
  $cls = new stdClass();
  $cls->is_error = TRUE;
  if ($msg == 'login_error') {
    $cls->error = t('There was a problem contacting the API. Please check your API credentials.');
  }
  else {
    $cls->error = $msg;
  }
  return $cls;
}