Skip to content

Commit 3390c78

Browse files
Fixed unnecessary exception logging in NotificationService
1 parent dd16c93 commit 3390c78

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/main/java/net/javadiscord/javabot/systems/notification/NotificationService.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,9 @@ abstract static class MessageChannelNotification {
4949
* @param function The {@link Function} which is used in order to send the message.
5050
*/
5151
protected void send(MessageChannel channel, @NotNull Function<MessageChannel, MessageAction> function) {
52-
function.apply(channel).queue(s -> {
53-
}, err -> {
54-
ExceptionLogger.capture(err, getClass().getSimpleName());
55-
log.error("Could not send message to channel \" " + channel.getName() + "\": ", err);
56-
});
52+
function.apply(channel).queue(s -> {},
53+
err -> log.error("Could not send message to channel \" " + channel.getName() + "\": ", err)
54+
);
5755
}
5856
}
5957
}

0 commit comments

Comments
 (0)