fix: [internal] SendEmail exceptions message and logging

pull/5240/head
Jakub Onderka 2020-04-26 21:44:22 +02:00
parent 65a4ece3bb
commit 6fc8e4d119
2 changed files with 4 additions and 2 deletions

View File

@ -316,7 +316,7 @@ class SendEmail
try {
$result = $email->send();
} catch (Exception $e) {
throw new SendEmailException("The message could be sent.", 0, $e);
throw new SendEmailException("The message could not be sent.", 0, $e);
}
if ($result && !$mock) {
@ -416,7 +416,7 @@ class SendEmail
$email->send();
return $encrypted;
} catch (Exception $e) {
throw new SendEmailException("The message could be sent.", 0, $e);
throw new SendEmailException("The message could not be sent.", 0, $e);
}
}

View File

@ -2853,6 +2853,8 @@ class AppModel extends Model
}
/**
* Log exception with backtrace and with nested exceptions.
*
* @param string $message
* @param Exception $exception
* @param int $type