TriggerReactor

TriggerReactor

24.6k Downloads

Give a better stacktrace message

wysohn opened this issue ยท 0 comments

commented
[10:56:09] [pool-268-thread-4/WARN]: java.lang.IllegalStateException: Asynchronous Async Chunk Load! Blocking thread until it returns 
[10:56:09] [pool-268-thread-4/WARN]:     at net.minecraft.server.v1_12_R1.MCUtil.ensureMain(MCUtil.java:54)
[10:56:09] [pool-268-thread-4/WARN]:     at org.bukkit.craftbukkit.v1_12_R1.chunkio.ChunkIOExecutor.syncChunkLoad(ChunkIOExecutor.java:18)
[10:56:09] [pool-268-thread-4/WARN]:     at net.minecraft.server.v1_12_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:170)
[10:56:09] [pool-268-thread-4/WARN]:     at net.minecraft.server.v1_12_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:153)
[10:56:09] [pool-268-thread-4/WARN]:     at net.minecraft.server.v1_12_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:149)
[10:56:09] [pool-268-thread-4/WARN]:     at net.minecraft.server.v1_12_R1.World.getChunkAt(World.java:357)
[10:56:09] [pool-268-thread-4/WARN]:     at net.minecraft.server.v1_12_R1.Entity.setLocation(Entity.java:1312)
[10:56:09] [pool-268-thread-4/WARN]:     at net.minecraft.server.v1_12_R1.PlayerConnection.internalTeleport(PlayerConnection.java:854)
[10:56:09] [pool-268-thread-4/WARN]:     at net.minecraft.server.v1_12_R1.PlayerConnection.teleport(PlayerConnection.java:811)
[10:56:09] [pool-268-thread-4/WARN]:     at org.bukkit.craftbukkit.v1_12_R1.entity.CraftPlayer.teleport(CraftPlayer.java:652)
[10:56:09] [pool-268-thread-4/WARN]:     at org.bukkit.craftbukkit.v1_12_R1.entity.CraftEntity.teleport(CraftEntity.java:310)
[10:56:09] [pool-268-thread-4/WARN]:     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[10:56:09] [pool-268-thread-4/WARN]:     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
[10:56:09] [pool-268-thread-4/WARN]:     at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[10:56:09] [pool-268-thread-4/WARN]:     at java.base/java.lang.reflect.Method.invoke(Method.java:567)
[10:56:09] [pool-268-thread-4/WARN]:     at io.github.wysohn.triggerreactor.tools.ReflectionUtil.invokeMethod(ReflectionUtil.java:297)
[10:56:09] [pool-268-thread-4/WARN]:     at io.github.wysohn.triggerreactor.tools.ReflectionUtil.invokeMethod(ReflectionUtil.java:361)
[10:56:09] [pool-268-thread-4/WARN]:     at io.github.wysohn.triggerreactor.core.script.interpreter.Interpreter.callFunction(Interpreter.java:1199)
[10:56:09] [pool-268-thread-4/WARN]:     at io.github.wysohn.triggerreactor.core.script.interpreter.Interpreter.interpret(Interpreter.java:1007)
[10:56:09] [pool-268-thread-4/WARN]:     at io.github.wysohn.triggerreactor.core.script.interpreter.Interpreter.start(Interpreter.java:554)
[10:56:09] [pool-268-thread-4/WARN]:     at io.github.wysohn.triggerreactor.core.script.interpreter.Interpreter.startWithContextAndInterrupter(Interpreter.java:186)
[10:56:09] [pool-268-thread-4/WARN]:     at io.github.wysohn.triggerreactor.core.manager.trigger.Trigger.start(Trigger.java:271)
[10:56:09] [pool-268-thread-4/WARN]:     at io.github.wysohn.triggerreactor.core.manager.trigger.Trigger$1.call(Trigger.java:226)
[10:56:09] [pool-268-thread-4/WARN]:     at io.github.wysohn.triggerreactor.core.manager.trigger.Trigger$1.call(Trigger.java:222)
[10:56:09] [pool-268-thread-4/WARN]:     at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[10:56:09] [pool-268-thread-4/WARN]:     at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
[10:56:09] [pool-268-thread-4/WARN]:     at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
[10:56:09] [pool-268-thread-4/WARN]:     at java.base/java.lang.Thread.run(Thread.java:831)

wrap Trigger.start() with try catch and raise RuntimeException with more detailed info (Trigger type, name, etc.) to help debugging such issue as above