diff --git a/src/main/java/org/janelia/saalfeldlab/n5/N5FSReader.java b/src/main/java/org/janelia/saalfeldlab/n5/N5FSReader.java index 327904f9..8ad58bf2 100644 --- a/src/main/java/org/janelia/saalfeldlab/n5/N5FSReader.java +++ b/src/main/java/org/janelia/saalfeldlab/n5/N5FSReader.java @@ -28,6 +28,8 @@ import com.google.gson.JsonObject; import java.io.Closeable; import java.io.IOException; +import java.net.URI; +import java.net.URISyntaxException; import java.nio.channels.Channels; import java.nio.channels.FileChannel; import java.nio.channels.OverlappingFileLockException; @@ -120,6 +122,8 @@ public N5FSReader(final String basePath, final GsonBuilder gsonBuilder) throws I final Version version = getVersion(); if (!VERSION.isCompatible(version)) throw new IOException("Incompatible version " + version + " (this is " + VERSION + ")."); + } else { + throw new IOException("Base Path for N5Reader does not exist: " + basePath); } }