From 47bda7832e6129638074008847ced6f7df66b708 Mon Sep 17 00:00:00 2001 From: David Nestorovic Date: Tue, 12 Nov 2024 14:49:41 +0100 Subject: [PATCH] Improve error messages --- .../org/graalvm/buildtools/agent/AgentConfiguration.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/utils/src/main/java/org/graalvm/buildtools/agent/AgentConfiguration.java b/common/utils/src/main/java/org/graalvm/buildtools/agent/AgentConfiguration.java index bfda3905..4ed13d01 100644 --- a/common/utils/src/main/java/org/graalvm/buildtools/agent/AgentConfiguration.java +++ b/common/utils/src/main/java/org/graalvm/buildtools/agent/AgentConfiguration.java @@ -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(); @@ -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());