Skip to content

Commit f1133cb

Browse files
authored
Show entitlement jar path in agent load failure (#130233) (#130244)
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 2507918 commit f1133cb

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
@@ -143,7 +143,7 @@ private static void loadAgent(String agentPath) {
143143
vm.detach();
144144
}
145145
} catch (AttachNotSupportedException | IOException | AgentLoadException | AgentInitializationException e) {
146-
throw new IllegalStateException("Unable to attach entitlement agent", e);
146+
throw new IllegalStateException("Unable to attach entitlement agent [" + agentPath + "]", e);
147147
}
148148
}
149149

0 commit comments

Comments
 (0)