2018-07-06 15:30:00 +02:00
|
|
|
package com.eu.habbo.threading;
|
|
|
|
|
|
|
|
import com.eu.habbo.Emulator;
|
|
|
|
|
|
|
|
import java.io.IOException;
|
|
|
|
import java.util.concurrent.ScheduledThreadPoolExecutor;
|
|
|
|
import java.util.concurrent.ThreadFactory;
|
|
|
|
|
2019-05-26 20:14:53 +02:00
|
|
|
public class HabboExecutorService extends ScheduledThreadPoolExecutor {
|
|
|
|
public HabboExecutorService(int corePoolSize, ThreadFactory threadFactory) {
|
2018-07-06 15:30:00 +02:00
|
|
|
super(corePoolSize, threadFactory);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2019-05-26 20:14:53 +02:00
|
|
|
protected void afterExecute(Runnable r, Throwable t) {
|
2018-07-06 15:30:00 +02:00
|
|
|
super.afterExecute(r, t);
|
|
|
|
|
2019-05-26 20:14:53 +02:00
|
|
|
if (t != null && !(t instanceof IOException)) {
|
|
|
|
try {
|
2018-07-06 15:30:00 +02:00
|
|
|
Emulator.getLogging().logErrorLine(t);
|
2019-05-26 20:14:53 +02:00
|
|
|
} catch (Exception e) {
|
2018-07-06 15:30:00 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|