mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-26 23:23:01 +00:00
Catch CancellationException while building chunks (#889)
Co-authored-by: Jason Mitchell <[email protected]>
This commit is contained in:
1 parent
ad2b73edf9
commit
d6d8a5dad6
1 file changed
+5
-2
+5
-2
@@ -31,6 +31,7 @@ import java.util.ArrayList;
|
||||
import java.util.Deque;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CancellationException;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.ConcurrentLinkedDeque;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
@@ -457,8 +458,10 @@ public class ChunkBuilder<T extends ChunkGraphicsState> {
|
||||
this.task = task;
|
||||
this.future = new CompletableFuture<>();
|
||||
this.future.exceptionally(e -> {
|
||||
LOGGER.info("Exception thrown while building chunk", e);
|
||||
// e.printStackTrace();
|
||||
if (!(e instanceof CancellationException)) {
|
||||
LOGGER.info("Exception thrown while building chunk", e);
|
||||
}
|
||||
|
||||
return null;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user