mirror of https://github.com/MISP/MISP
fix: [internal] SendEmail exceptions message and logging
parent
65a4ece3bb
commit
6fc8e4d119
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue