[jboss-jira] [JBoss JIRA] (WFCORE-785) Improve capability related error messages

Brian Stansberry (JIRA) issues at jboss.org
Tue Jun 30 11:58:02 EDT 2015


Brian Stansberry created WFCORE-785:
---------------------------------------

             Summary: 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.CR1


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