mirror of
https://github.com/DiscordSRV/Ascension.git
synced 2024-12-28 17:37:52 +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();
|
Object listener = eventListener.listener();
|
||||||
eventListener.method().invoke(listener, event);
|
eventListener.method().invoke(listener, event);
|
||||||
} catch (IllegalAccessException e) {
|
} 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) {
|
} catch (InvocationTargetException e) {
|
||||||
String eventClassName = eventClass.getName();
|
String eventClassName = eventClass.getName();
|
||||||
Throwable cause = e.getCause();
|
Throwable cause = e.getCause();
|
||||||
if (eventListener.className().startsWith("com.discordsrv")) {
|
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 {
|
} else {
|
||||||
e.getCause().printStackTrace();
|
e.getCause().printStackTrace();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user