X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FBAO%2FFile.php;h=c2c06bd279fbc166fe15af0537e3f7c2afe6d840;hb=9ae833d8d7bf2a57ab281702006dba00a577e8d8;hp=c9a1265d671ed7dec42d0752e4e6e171cd2a8549;hpb=144dacf19067161923f93ddd7178bb938b04c969;p=civicrm-core.git diff --git a/CRM/Core/BAO/File.php b/CRM/Core/BAO/File.php index c9a1265d67..c2c06bd279 100644 --- a/CRM/Core/BAO/File.php +++ b/CRM/Core/BAO/File.php @@ -210,7 +210,7 @@ class CRM_Core_BAO_File extends CRM_Core_DAO_File { $fileDAO = new CRM_Core_DAO_File(); $fileDAO->id = $fileID; if (!$fileDAO->find(TRUE)) { - CRM_Core_Error::fatal(); + throw new CRM_Core_Exception(ts('File not found')); } // lets call a pre hook before the delete, so attachments hooks can get the info before things @@ -226,7 +226,7 @@ class CRM_Core_BAO_File extends CRM_Core_DAO_File { $entityFileDAO->entity_table = $tableName; if (!$entityFileDAO->find(TRUE)) { - CRM_Core_Error::fatal(sprintf('No record found for given file ID - %d and entity ID - %d', $fileID, $entityID)); + throw new CRM_Core_Exception(sprintf('No record found for given file ID - %d and entity ID - %d', $fileID, $entityID)); } $entityFileDAO->delete();