Skip to content

Commit b4ed940

Browse files
committed
Log why a properties file was not loaded
1 parent 875286a commit b4ed940

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

sentry/src/main/java/io/sentry/config/FilesystemPropertiesLoader.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ public FilesystemPropertiesLoader(@NotNull String filePath, @NotNull ILogger log
3131
properties.load(is);
3232
return properties;
3333
}
34+
} else if (!f.isFile()) {
35+
logger.log(
36+
SentryLevel.ERROR, "Failed to load Sentry configuration since it is not a file or does not exist: %s", filePath);
37+
} else if (!f.canRead()) {
38+
logger.log(
39+
SentryLevel.ERROR, "Failed to load Sentry configuration since it is not readable: %s", filePath);
3440
}
3541
} catch (IOException e) {
3642
logger.log(

0 commit comments

Comments
 (0)