Repository: logging-log4j2 Updated Branches: refs/heads/master 565a3d0ab -> 8c6d0f382
Collapse catch blocks. Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/8c6d0f38 Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/8c6d0f38 Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/8c6d0f38 Branch: refs/heads/master Commit: 8c6d0f38287f651c80b991e724488ea9f0aa985e Parents: 565a3d0 Author: Matt Sicker <[email protected]> Authored: Sun Mar 6 20:47:48 2016 -0600 Committer: Matt Sicker <[email protected]> Committed: Sun Mar 6 20:47:48 2016 -0600 ---------------------------------------------------------------------- .../java/org/apache/logging/log4j/core/net/SmtpManager.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/8c6d0f38/log4j-core/src/main/java/org/apache/logging/log4j/core/net/SmtpManager.java ---------------------------------------------------------------------- diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/net/SmtpManager.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/net/SmtpManager.java index f3878f9..54bbc93 100644 --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/net/SmtpManager.java +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/net/SmtpManager.java @@ -162,13 +162,7 @@ public class SmtpManager extends AbstractManager { final MimeMultipart mp = getMimeMultipart(encodedBytes, headers); sendMultipartMessage(message, mp); - } catch (final MessagingException e) { - logError("caught exception while sending e-mail notification.", e); - throw new LoggingException("Error occurred while sending email", e); - } catch (final IOException e) { - logError("caught exception while sending e-mail notification.", e); - throw new LoggingException("Error occurred while sending email", e); - } catch (final RuntimeException e) { + } catch (final MessagingException | IOException | RuntimeException e) { logError("caught exception while sending e-mail notification.", e); throw new LoggingException("Error occurred while sending email", e); }
