diff --git a/plugins/FeedsProcessor.inc b/plugins/FeedsProcessor.inc index 54ec731..611e05b 100644 --- a/plugins/FeedsProcessor.inc +++ b/plugins/FeedsProcessor.inc @@ -172,8 +172,17 @@ abstract class FeedsProcessor extends FeedsPlugin { } } + if (!empty($entity->title)) { + $message = t('@error in item @title:', array('@error' => $e->getMessage(), '@title' => $entity->title)); + } + else if (!empty($entity->feeds_item->guid)) { + $message = t('@error in item @guid:', array('@error' => $e->getMessage(), '@guid' => $entity->feeds_item->guid)); + } + else { + $message = $e->getMessage(); + } // Compose the final error message and throw exception. - $message = t('@error in item @guid', array('@error' => $e->getMessage(), '@guid' => $entity->feeds_item->guid)) . theme('item_list', array('items' => $errors)); + $message .= theme('item_list', array('items' => $errors)); throw new FeedsValidationException($message); } }