More Throwable handling

Signed-off-by: TheMode <themode@outlook.fr>
This commit is contained in:
TheMode 2021-09-01 17:15:49 +02:00
parent 9bb4043571
commit 0f2d850dce
2 changed files with 3 additions and 2 deletions

View File

@ -15,6 +15,7 @@ public final class ExceptionManager {
* @param e the occurred exception * @param e the occurred exception
*/ */
public void handleException(Throwable e) { public void handleException(Throwable e) {
// TODO handle OOM exceptions
this.getExceptionHandler().handleException(e); this.getExceptionHandler().handleException(e);
} }

View File

@ -135,7 +135,7 @@ public abstract class ThreadProvider {
return; return;
try { try {
chunk.tick(time); chunk.tick(time);
} catch (Exception e) { } catch (Throwable e) {
MinecraftServer.getExceptionManager().handleException(e); MinecraftServer.getExceptionManager().handleException(e);
} }
final var entities = chunkEntry.entities; final var entities = chunkEntry.entities;
@ -148,7 +148,7 @@ public abstract class ThreadProvider {
} }
try { try {
entity.tick(time); entity.tick(time);
} catch (Exception e) { } catch (Throwable e) {
MinecraftServer.getExceptionManager().handleException(e); MinecraftServer.getExceptionManager().handleException(e);
} }
} }