Skip to content

Commit

Permalink
Improve error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
dnestoro committed Nov 12, 2024
1 parent 0613de2 commit 47bda78
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,13 @@ private void addDefaultAccessFilter() {

try(InputStream accessFilterData = AgentConfiguration.class.getResourceAsStream(DEFAULT_ACCESS_FILTER_FILE_LOCATION)) {
if (accessFilterData == null) {
throw new IOException("Cannot find access-filter.json on default location: " + DEFAULT_ACCESS_FILTER_FILE_LOCATION);
throw new IOException("Cannot access data from: " + DEFAULT_ACCESS_FILTER_FILE_LOCATION);
}

try {
Files.createDirectory(agentDir);
} catch (FileAlreadyExistsException e) {
logger.info("Ignore directory creation because " + agentDir + " directory is already created.");
logger.info("Skip creation of directory " + agentDir + " (already created).");
}

long pid = ProcessHandle.current().pid();
Expand All @@ -172,7 +172,7 @@ private void addDefaultAccessFilter() {
Files.move(tmpAccessFilter, accessFilterFile, StandardCopyOption.ATOMIC_MOVE);
} catch (FileAlreadyExistsException e) {
Files.delete(tmpAccessFilter);
logger.info("Access-filter file already exists. Delete the temporary one.");
logger.info(accessFilterFile + " already exists. Delete " + tmpAccessFilter);
}

accessFilterFiles.add(accessFilterFile.toString());
Expand Down

0 comments on commit 47bda78

Please sign in to comment.