Replace System.exit with throwing an Exception

This commit is contained in:
Maschell 2019-04-19 11:38:02 +02:00
parent 39d10291a2
commit a5929f346d

View File

@ -161,7 +161,7 @@ public abstract class WUDDiscReader {
public RandomAccessFile getRandomAccessFileStream() throws FileNotFoundException { public RandomAccessFile getRandomAccessFileStream() throws FileNotFoundException {
if (getImage() == null || getImage().getFileHandle() == null) { if (getImage() == null || getImage().getFileHandle() == null) {
log.warning("No image or image filehandle set."); log.warning("No image or image filehandle set.");
System.exit(1); // TODO: NOOOOOOOOOOOOO throw new FileNotFoundException("No image or image filehandle set.");
} }
return new RandomAccessFile(getImage().getFileHandle(), "r"); return new RandomAccessFile(getImage().getFileHandle(), "r");
} }