Browse Source

Catch the typed exception and return FALSE for a deprecation cycle.

pull/680/head
Jordan Dukart 9 years ago
parent
commit
4a00210041
  1. 8
      includes/tuque_wrapper.inc

8
includes/tuque_wrapper.inc

@ -239,6 +239,14 @@ class IslandoraFedoraObject extends FedoraObject {
islandora_invoke_datastream_hooks(ISLANDORA_DATASTREAM_INGESTED_HOOK, $object->models, $datastream->id, $object, $datastream); islandora_invoke_datastream_hooks(ISLANDORA_DATASTREAM_INGESTED_HOOK, $object->models, $datastream->id, $object, $datastream);
return $ret; return $ret;
} }
catch (DatastreamExistsException $e) {
$message = islandora_deprecated('7.x-1.10', t('The datastream @dsid already exists on the object: @pid. After the 7.x-1.10 release this will throw an exception.', array(
'@dsid' => $datastream->id,
'@pid' => $object->id,
)));
trigger_error(filter_xss($message), E_USER_DEPRECATED);
return FALSE;
}
catch (Exception $e) { catch (Exception $e) {
watchdog('islandora', 'Failed to ingest datastream @dsid on object: @pid</br>code: @code<br/>message: @msg', array( watchdog('islandora', 'Failed to ingest datastream @dsid on object: @pid</br>code: @code<br/>message: @msg', array(
'@pid' => $object->id, '@pid' => $object->id,

Loading…
Cancel
Save