Skip to content

Commit 89822ba

Browse files
committed
improved some logging in VFS
1 parent da9f6d9 commit 89822ba

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

graalpython/org.graalvm.python.embedding/src/org/graalvm/python/embedding/utils/VirtualFileSystem.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,13 @@ private void removeExtractDir() {
373373
this.mountPoint = Path.of(mp);
374374
this.mountPointLowerCase = mp.toLowerCase(Locale.ROOT);
375375
if (mp.endsWith(PLATFORM_SEPARATOR) || !mountPoint.isAbsolute()) {
376-
throw new IllegalArgumentException("GRAALPY_VFS_MOUNT_POINT must be set to an absolute path without a trailing separator");
376+
String msg;
377+
if (System.getenv("GRAALPY_VFS_MOUNT_POINT") != null) {
378+
msg = String.format("Environment variable GRAALPY_VFS_MOUNT_POINT must be set to an absolute path without a trailing separator: '%s'", mp);
379+
} else {
380+
msg = String.format("Virtual filesystem mount point must be set to an absolute path without a trailing separator: '%s'", mp);
381+
}
382+
throw new IllegalArgumentException(msg);
377383
}
378384

379385
fine("VirtualFilesystem %s, allowHostIO: %s, resourceLoadingClass: %s, caseInsensitive: %s, extractOnStartup: %s%s",

0 commit comments

Comments
 (0)