[jboss-jira] [JBoss JIRA] (WFCORE-785) Improve capability related error messages
Brian Stansberry (JIRA)
issues at jboss.org
Thu Sep 10 14:25:00 EDT 2015
[ https://issues.jboss.org/browse/WFCORE-785?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13107536#comment-13107536 ]
Brian Stansberry commented on WFCORE-785:
-----------------------------------------
This likely won't happen for 2.0 but I've bumped it to CR2 just in case. Nothing should be done on this for CR2 though unless it's really simple. Anything complicated means this needs to be deferred to 3.
> 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.CR2
>
>
> 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.4.11#64026)
More information about the jboss-jira
mailing list