forked from mirror/BlueMap
Use default exception handler again
This commit is contained in:
parent
79a12d4d80
commit
b28b4e8c1f
@ -63,17 +63,12 @@ public class BlueMap {
|
|||||||
Runtime.getRuntime().availableProcessors(),
|
Runtime.getRuntime().availableProcessors(),
|
||||||
pool -> {
|
pool -> {
|
||||||
ForkJoinWorkerThread thread = ForkJoinPool.defaultForkJoinWorkerThreadFactory.newThread(pool);
|
ForkJoinWorkerThread thread = ForkJoinPool.defaultForkJoinWorkerThreadFactory.newThread(pool);
|
||||||
thread.setContextClassLoader(BlueMap.class.getClassLoader()); // use plugin-intended classloader
|
// use current classloader, this fixes ClassLoading issues with forge
|
||||||
thread.setName("BlueMap-FJ-" + thread.getPoolIndex());
|
thread.setContextClassLoader(BlueMap.class.getClassLoader());
|
||||||
|
thread.setName("BlueMap-FJP-" + thread.getPoolIndex());
|
||||||
return thread;
|
return thread;
|
||||||
},
|
},
|
||||||
(thread, ex) -> {
|
null,
|
||||||
if (ex instanceof ClassNotFoundException && ex.getMessage().contains("RemovalCause")) {
|
|
||||||
Logger.global.noFloodWarning("RemovalCauseError", ex.getMessage());
|
|
||||||
} else {
|
|
||||||
Logger.global.logError("Something went wrong!", ex);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user