mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2025-01-01 14:08:11 +01:00
Use FaweException for handled exception
As it's faster not to calculate the stacktrace
This commit is contained in:
parent
46887623bc
commit
eee32ca27a
@ -5,6 +5,7 @@ import com.boydti.fawe.jnbt.NBTStreamer;
|
||||
import com.boydti.fawe.object.FaweQueue;
|
||||
import com.boydti.fawe.object.RunnableVal;
|
||||
import com.boydti.fawe.object.RunnableVal4;
|
||||
import com.boydti.fawe.object.exception.FaweException;
|
||||
import com.boydti.fawe.object.io.BufferedRandomAccessFile;
|
||||
import com.boydti.fawe.object.io.FastByteArrayInputStream;
|
||||
import com.boydti.fawe.object.io.FastByteArrayOutputStream;
|
||||
@ -16,7 +17,6 @@ import java.io.BufferedInputStream;
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.ArrayList;
|
||||
@ -54,7 +54,7 @@ public class MCAFile {
|
||||
this.queue = parent;
|
||||
this.file = file;
|
||||
if (!file.exists()) {
|
||||
throw new FileNotFoundException(file.toString());
|
||||
throw new FaweException.FaweChunkLoadException();
|
||||
}
|
||||
this.locations = new byte[4096];
|
||||
this.raf = new BufferedRandomAccessFile(file, "rw", Settings.HISTORY.BUFFER_SIZE);
|
||||
|
@ -6,6 +6,7 @@ import com.boydti.fawe.example.NullFaweChunk;
|
||||
import com.boydti.fawe.object.FaweChunk;
|
||||
import com.boydti.fawe.object.FaweQueue;
|
||||
import com.boydti.fawe.object.RunnableVal;
|
||||
import com.boydti.fawe.object.exception.FaweException;
|
||||
import com.boydti.fawe.util.MathMan;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
@ -44,6 +45,7 @@ public class MCAQueueMap implements IFaweQueueMap {
|
||||
if (lastFile == null) {
|
||||
try {
|
||||
lastFile = new MCAFile(queue, lastFileX, lastFileZ);
|
||||
} catch (FaweException.FaweChunkLoadException ignore) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return lastFile = null;
|
||||
|
Loading…
Reference in New Issue
Block a user