watchdog('aggregator','HTTP request to @url failed with error: @error',array('@url'=>$form_state['values']['remote'],'@error'=>$response->error));
catch(BadResponseException$e){
$response=$e->getResponse();
watchdog('aggregator','Failed to download OPML file due to "%error".',array('%error'=>$response->getStatusCode().' '.$response->getReasonPhrase()),WATCHDOG_WARNING);
drupal_set_message(t('Failed to download OPML file due to "%error".',array('%error'=>$response->getStatusCode().' '.$response->getReasonPhrase())));
return;
}
catch(RequestException$e){
watchdog('aggregator','Failed to download OPML file due to "%error".',array('%error'=>$e->getMessage()),WATCHDOG_WARNING);
drupal_set_message(t('Failed to download OPML file due to "%error".',array('%error'=>$e->getMessage())));