From 6e21b42ef927e8a7fbdd268fdfcaacb36a4ec30f Mon Sep 17 00:00:00 2001 From: hazim Date: Thu, 7 Mar 2019 16:10:10 +0800 Subject: [PATCH] update contact recode and clean up --- .../Contacts/Exceptions/CannotCreateContactException.php | 7 +++++-- .../ControllersLogic/Contacts/CreateContactLogic.php | 5 +++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/Classes/Modules/Contacts/Exceptions/CannotCreateContactException.php b/app/Classes/Modules/Contacts/Exceptions/CannotCreateContactException.php index 1fbe8cf..6609024 100644 --- a/app/Classes/Modules/Contacts/Exceptions/CannotCreateContactException.php +++ b/app/Classes/Modules/Contacts/Exceptions/CannotCreateContactException.php @@ -1,13 +1,16 @@ createContact->execute($object, $type, $referenceId); } - catch (){ - + catch (CannotCreateContactException $exception){ + throw new InternalServerErrorException("Failed to create contact because {$exception->getMessage()}"); } }