Skip to content

Commit 8518c19

Browse files
authored
Show entitlement jar path in agent load failure (#130233) (#130246)
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 33a439d commit 8518c19

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
@@ -122,7 +122,7 @@ static void loadAgent(String agentPath, String entitlementInitializationClassNam
122122
vm.detach();
123123
}
124124
} catch (AttachNotSupportedException | IOException | AgentLoadException | AgentInitializationException e) {
125-
throw new IllegalStateException("Unable to attach entitlement agent", e);
125+
throw new IllegalStateException("Unable to attach entitlement agent [" + agentPath + "]", e);
126126
}
127127
}
128128

0 commit comments

Comments
 (0)