diff --git a/CRM/Grant/BAO/GrantPayment.php b/CRM/Grant/BAO/GrantPayment.php index c28edf5ebb72f2ade34f7a8055e6b64783351e96..544ec04cd96eda3361b8f4ac6f2628df1af33869 100755 --- a/CRM/Grant/BAO/GrantPayment.php +++ b/CRM/Grant/BAO/GrantPayment.php @@ -245,10 +245,10 @@ class CRM_Grant_BAO_GrantPayment extends CRM_Grant_DAO_GrantPayment { $dao->fetch(); if (!$dao->N) { if ($params['messageTemplateID']) { - CRM_Core_Error::fatal(ts('No such message template: id=%1.', array(1 => $params['messageTemplateID']))); + throw new CRM_Core_Exception(ts('No such message template: id=%1.', array(1 => $params['messageTemplateID']))); } else { - CRM_Core_Error::fatal(ts('No such message template: option group %1, option value %2.', array(1 => $params['groupName'], 2 => $params['valueName']))); + throw new CRM_Core_Exception(ts('No such message template: option group %1, option value %2.', array(1 => $params['groupName'], 2 => $params['valueName']))); } } @@ -317,7 +317,7 @@ class CRM_Grant_BAO_GrantPayment extends CRM_Grant_DAO_GrantPayment { $grantDao->fetch(); if (!$grantDao->N) { - CRM_Core_Error::fatal(ts('No such message template.')); + throw new CRM_Core_Exception(ts('No such message template.')); } $subject = $grantDao->subject; $html = $grantDao->html; diff --git a/CRM/Grant/BAO/GrantProgram.php b/CRM/Grant/BAO/GrantProgram.php index 10c29a2d9525a9e73a749943bed9b1ae7e2bd382..46295850857047cf918d49527496ef654b7d3a62 100755 --- a/CRM/Grant/BAO/GrantProgram.php +++ b/CRM/Grant/BAO/GrantProgram.php @@ -55,7 +55,7 @@ class CRM_Grant_BAO_GrantProgram extends CRM_Grant_DAO_GrantProgram { */ static function del($grantProgramID) { if (!$grantProgramID) { - CRM_Core_Error::fatal(ts('Invalid value passed to delete function')); + throw new CRM_Core_Exception(ts('Invalid value passed to delete function')); } $dao = new CRM_Grant_DAO_GrantProgram(); diff --git a/CRM/Grant/Form/Task/Cancel.php b/CRM/Grant/Form/Task/Cancel.php index dc2b054057e55210c98a728496c36c3bb754ad9f..a10b03a9167a17c0c2e34f83cd580373492f8bc7 100755 --- a/CRM/Grant/Form/Task/Cancel.php +++ b/CRM/Grant/Form/Task/Cancel.php @@ -51,7 +51,7 @@ class CRM_Grant_Form_Task_Cancel extends CRM_Grant_Form_PaymentTask { //check permission for delete. if (!CRM_Core_Permission::checkActionPermission('CiviGrant', CRM_Core_Action::DELETE)) { - CRM_Core_Error::fatal(ts('You do not have permission to access this page')); + throw new CRM_Core_Exception(ts('You do not have permission to access this page')); } } diff --git a/CRM/Grant/Form/Task/Pay.php b/CRM/Grant/Form/Task/Pay.php index c53c39019a5f7842d049e6f5b2ed71a6827a93f0..bdc11528f532c7b2b9c01a2642881c727fa73408 100755 --- a/CRM/Grant/Form/Task/Pay.php +++ b/CRM/Grant/Form/Task/Pay.php @@ -53,7 +53,7 @@ class CRM_Grant_Form_Task_Pay extends CRM_Grant_Form_Task { function preProcess() { parent::preProcess(); if (!CRM_Core_Permission::check('create payments in CiviGrant')) { - CRM_Core_Error::fatal(ts( 'You do not have permission to access this page')); + throw new CRM_Core_Exception(ts( 'You do not have permission to access this page')); } } diff --git a/CRM/Grant/Form/Task/Reprint.php b/CRM/Grant/Form/Task/Reprint.php index 66ffde6639fe351570f44bf59d45fcdf05b4377b..4a0fe7baa41d756ac245ae3d525cc4de9c64dd59 100755 --- a/CRM/Grant/Form/Task/Reprint.php +++ b/CRM/Grant/Form/Task/Reprint.php @@ -21,7 +21,7 @@ class CRM_Grant_Form_Task_Reprint extends CRM_Grant_Form_PaymentTask { function preProcess() { parent::preProcess(); if (!CRM_Core_Permission::check('create payments in CiviGrant')) { - CRM_Core_Error::fatal( ts( 'You do not have permission to access this page' ) ); + throw new CRM_Core_Exception( ts( 'You do not have permission to access this page' ) ); } $validIDs = CRM_Utils_Array::collect('id', CRM_Core_DAO::executeQuery( sprintf( diff --git a/CRM/Grant/Form/Task/Update.php b/CRM/Grant/Form/Task/Update.php index cc518e01c2742400c201ecb995eb1e297785d3fa..048031191911c7413e452423e775353aa4c9d299 100644 --- a/CRM/Grant/Form/Task/Update.php +++ b/CRM/Grant/Form/Task/Update.php @@ -51,7 +51,7 @@ class CRM_Grant_Form_Task_Update extends CRM_Grant_Form_Task { //check permission for update. if (!CRM_Core_Permission::checkActionPermission('CiviGrant', CRM_Core_Action::UPDATE)) { - CRM_Core_Error::fatal(ts('You do not have permission to access this page')); + throw new CRM_Core_Exception(ts('You do not have permission to access this page')); } }