[jboss-jira] [JBoss JIRA] (WFCORE-785) Improve capability related error messages
Brian Stansberry (JIRA)
issues at jboss.org
Fri Aug 14 17:01:14 EDT 2015
[ https://issues.jboss.org/browse/WFCORE-785?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brian Stansberry updated WFCORE-785:
------------------------------------
Fix Version/s: 2.0.0.Beta3
(was: 2.0.0.Beta2)
> Improve capability related error messages
> -----------------------------------------
>
> Key: WFCORE-785
> URL: https://issues.jboss.org/browse/WFCORE-785
> Project: WildFly Core
> Issue Type: Enhancement
> Components: Domain Management
> Reporter: Brian Stansberry
> Fix For: 2.0.0.Beta3
>
>
> When operation handlers request non-existent capabilities, the error messages aren't particularly helpful. For example:
> /"WFLYCTL0158: Operation handler failed: java.lang.IllegalStateException: WFLYCTL0364: Capability 'org.wildfly.data-source.invalid' is unknown."
> This is largely because it's the CapabilityRegistry that throws the exceptions, and it doesn't have much context about why the capability is needed to use in a better error message.
> Likely solutions are:
> 1) If CapabilityRegistryImpl has more context than is being used, look into using it.
> 2) Provide more context to CapabilityRegistry (I don't much like this one; providing parameters to a call only for use in a failure message is smelly to me.)
> 3) Use a custom exception type when the capability is missing, instead of ISE, and have OperationContextImpl catch that and add contextual information.
> I expect 3) is the likely solution.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
More information about the jboss-jira
mailing list