Skip to content

Commit 2a9a5f6

Browse files
authored
Show entitlement jar path in agent load failure (#130233) (#130245)
When the entitelement agent fails to load the underlying exception can be cryptic. In some casees it may be that the path the agent jar is bad. This commit expands the exception message to show the agent path that we tried to load.
1 parent 20c9542 commit 2a9a5f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libs/entitlement/src/main/java/org/elasticsearch/entitlement/bootstrap/EntitlementBootstrap.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ private static void loadAgent(String agentPath) {
148148
vm.detach();
149149
}
150150
} catch (AttachNotSupportedException | IOException | AgentLoadException | AgentInitializationException e) {
151-
throw new IllegalStateException("Unable to attach entitlement agent", e);
151+
throw new IllegalStateException("Unable to attach entitlement agent [" + agentPath + "]", e);
152152
}
153153
}
154154

0 commit comments

Comments
 (0)