Skip to content

Commit 5cc94b9

Browse files
[GR-58237] Improve the error message when NativeImageFileSystemProvider is not present.
PullRequest: graal/18955
2 parents c7ef68b + 085e8be commit 5cc94b9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jdk/resources/NativeImageResourceFileSystemProvider.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525

2626
package com.oracle.svm.core.jdk.resources;
2727

28-
import com.oracle.svm.core.jdk.JavaNetSubstitutions;
29-
3028
import java.io.IOException;
3129
import java.io.InputStream;
3230
import java.io.OutputStream;
@@ -56,6 +54,8 @@
5654
import java.util.concurrent.locks.ReadWriteLock;
5755
import java.util.concurrent.locks.ReentrantReadWriteLock;
5856

57+
import com.oracle.svm.core.jdk.JavaNetSubstitutions;
58+
5959
public class NativeImageResourceFileSystemProvider extends FileSystemProvider {
6060

6161
private final String resourcePath = "/resources";
@@ -141,7 +141,8 @@ public FileSystem getFileSystem(URI uri) {
141141
try {
142142
readLock.lock();
143143
if (fileSystem == null) {
144-
throw new FileSystemNotFoundException();
144+
throw new FileSystemNotFoundException("The Native Image Resource File System is not present. " +
145+
"Please create a new file system using the `newFileSystem` operation before attempting any file system operations on resource URIs.");
145146
}
146147
return fileSystem;
147148
} finally {

0 commit comments

Comments
 (0)