DefaultUncaughtExceptionHandlerWithName .java

net.minecraft.DefaultUncaughtExceptionHandlerWithName (class, 18 lines): members: uncaughtException, logger. imports: Logger.

net.minecraftclass18 linescommon489 B

Implements

API Surface (1)

void uncaughtException(final Thread t, final Throwable e)

Fields & Constants (1)

logger

Full Source

DefaultUncaughtExceptionHandlerWithName.java18 lines · Minecraft 26.3 · verbatim
1
package net.minecraft;
2
3
import java.lang.Thread.UncaughtExceptionHandler;
4
import org.slf4j.Logger;
5
6
public class DefaultUncaughtExceptionHandlerWithName implements UncaughtExceptionHandler {
7
	private final Logger logger;
8
9
	public DefaultUncaughtExceptionHandlerWithName(final Logger logger) {
10
		this.logger = logger;
11
	}
12
13
	@Override
14
	public void uncaughtException(final Thread t, final Throwable e) {
15
		this.logger.error("Caught previously unhandled exception in {}", t.getName(), e);
16
	}
17
}
18

Decompiled Minecraft 26.3 source of DefaultUncaughtExceptionHandlerWithName (net/minecraft/DefaultUncaughtExceptionHandlerWithName.java) with Mojang official mappings, stored verbatim on the site.