mirror of
https://github.com/DiscordSRV/Ascension.git
synced 2024-12-27 17:28:23 +01:00
Fix logger usage in EventBusImpl
This commit is contained in:
parent
2146fe29aa
commit
9bb2502cdb
@ -208,12 +208,12 @@ public class EventBusImpl implements EventBus {
|
||||
Object listener = eventListener.listener();
|
||||
eventListener.method().invoke(listener, event);
|
||||
} catch (IllegalAccessException e) {
|
||||
discordSRV.logger().error("Failed to access listener method: " + eventListener.methodName() + " in " + eventListener.className(), e);
|
||||
logger.error("Failed to access listener method: " + eventListener.methodName() + " in " + eventListener.className(), e);
|
||||
} catch (InvocationTargetException e) {
|
||||
String eventClassName = eventClass.getName();
|
||||
Throwable cause = e.getCause();
|
||||
if (eventListener.className().startsWith("com.discordsrv")) {
|
||||
discordSRV.logger().error("Failed to pass " + eventClassName + " to " + eventListener, cause);
|
||||
logger.error("Failed to pass " + eventClassName + " to " + eventListener, cause);
|
||||
} else {
|
||||
e.getCause().printStackTrace();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user