Show entitlement jar path in agent load failure (#130233)

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.
This commit is contained in:
Ryan Ernst 2025-06-27 11:00:18 -07:00 committed by GitHub
parent ea2e7b4382
commit 5dcded20a9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -122,7 +122,7 @@ public class EntitlementBootstrap {
vm.detach(); vm.detach();
} }
} catch (AttachNotSupportedException | IOException | AgentLoadException | AgentInitializationException e) { } catch (AttachNotSupportedException | IOException | AgentLoadException | AgentInitializationException e) {
throw new IllegalStateException("Unable to attach entitlement agent", e); throw new IllegalStateException("Unable to attach entitlement agent [" + agentPath + "]", e);
} }
} }