-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Catch Email Exceptions #1190
Catch Email Exceptions #1190
Conversation
Signed-off-by: Christoph Potas <[email protected]>
~ fix inverted $method result Signed-off-by: Christoph Potas <[email protected]>
The problem with this is that it hides that actual exception that happened from the developer. I believe that exception will only be thrown if the server isn't setup correctly, right, which is something the developer should know about. I haven't had a chance to look through the causes in depth, but if it's something that would only crop up in development, or when testing a new server, it should throw it and fail very loudly so the developer knows. If it's something that can crop up during normal usage, then it should at least be logged so the developer can find the issue later. |
Yes, if it is just that it would be fine - but you also have this exception if the Mail Server is busy, failed to establish connection or other problems with the mail server.
This was the first workaround - so maybe we should check for wrong config exception so we can ignore it ( not catch )
…
On Aug 30, 2018 at 4:39 PM, <Lonnie Ezell ***@***.***)> wrote:
The problem with this is that it hides that actual exception that happened from the developer. I believe that exception will only be thrown if the server isn't setup correctly, right, which is something the developer should know about.
I haven't had a chance to look through the causes in depth, but if it's something that would only crop up in development, or when testing a new server, it should throw it and fail very loudly so the developer knows. If it's something that can crop up during normal usage, then it should at least be logged so the developer can find the issue later.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub (#1190 (comment)), or mute the thread (https://github.com/notifications/unsubscribe-auth/ACUQbGiPxX7AXeopnZ_NSZ75NQ_G8J0Nks5uV_ktgaJpZM4WTlVu).
|
Ok, cool. As long as we log it, then, I think it should be fine. |
Signed-off-by: Christoph Potas <[email protected]>
Thanks for that addition. I should have been clearer, though. Instead of using Services within the class, I would rather use the LoggerAwareTrait and add the logger instance in the constructor (in system/Config/Services.php) See the Session class and it's service method for an example. |
Signed-off-by: Christoph Potas <[email protected]>
Thanks for doing that. Merging. |
catch exceptions that are thrown in the send mail function
-> caused by wrong/invalid mail config
Signed-off-by: Christoph Potas [email protected]