Skip to content
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

Bug fix - removed some Mail code #182

Merged
merged 2 commits into from
Jul 11, 2017
Merged

Conversation

jpearce185
Copy link
Contributor

Description

I removed some code pertaining to catching errors with PHPMailer objects.

Motivation and Context

Since PHPMailer objects can throw phpmailer exceptions, some error handling code is not needed because it is redundant. Since we catch all exceptions using a generic exception, getMessage() and ErrorInfo will provide the same message, but from different sources. Another reason to delete ErrorInfo is because if the error occurs in the initMailWrapper, a mail object will not exist, and therefore ErrorInfo will be useless. getMessage() would still be able to provide us with the same error response ErrorInfo would normally provide us, so ErrorInfo is not needed.

Tests performed

I (purposely) caused a mail-related error with only getMessage printing the error, and then with only ErrorInfo printing the error, and the messages were the same.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project as found in the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@plessbd plessbd merged commit c468b9a into ubccr:xdmod7.0 Jul 11, 2017
@tyearke tyearke added bug Bugfixes qa labels Aug 14, 2017
@tyearke tyearke added this to the v7.0.0 milestone Aug 14, 2017
@plessbd plessbd added the qa / testing Updates/additions to tests label Mar 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bugfixes qa / testing Updates/additions to tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants