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