Catch all progress tracker errors
This commit is contained in:
parent
f8a606c783
commit
9e6c90430d
@ -26,7 +26,11 @@ public class DefaultFaweQueueMap implements IFaweQueueMap {
|
||||
@Override
|
||||
public FaweChunk put(Long key, FaweChunk value) {
|
||||
if (parent.getProgressTask() != null) {
|
||||
try {
|
||||
parent.getProgressTask().run(FaweQueue.ProgressType.QUEUE, size() + 1);
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return super.put(key, value);
|
||||
}
|
||||
|
@ -205,7 +205,11 @@ public abstract class MappedFaweQueue<WORLD, CHUNK, SECTION> extends FaweQueue {
|
||||
public void runTasks() {
|
||||
super.runTasks();
|
||||
if (getProgressTask() != null) {
|
||||
try {
|
||||
getProgressTask().run(ProgressType.DONE, 1);
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
ArrayDeque<Runnable> tmp = new ArrayDeque<>(tasks);
|
||||
tasks.clear();
|
||||
|
@ -397,7 +397,11 @@ public abstract class FaweQueue {
|
||||
this.notifyAll();
|
||||
}
|
||||
if (getProgressTask() != null) {
|
||||
try {
|
||||
getProgressTask().run(ProgressType.DONE, 1);
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
while (!tasks.isEmpty()) {
|
||||
Runnable task = tasks.poll();
|
||||
|
Loading…
Reference in New Issue
Block a user