Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-189

Deprecate "new OperationException(ModelNode failureDescription)"

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • Minor
    • 1.0.0.Alpha11
    • None
    • Management
    • None

    Description

      The OperationException(ModelNode failureDescription) constructor javadoc states that it "Constructs a OperationFailedException with no detail message." The absence of a detail message makes it an odd case for normal exception handling code, as getMessage() and getLocalizedMessage() return null and toString() just returns the class name.

      The vast majority of uses of this constructor just pass a ModelType.STRING ModelNode, so they should just call the constructor that takes a String param. For the few other cases that want to pass through some sort of complex ModelNode failureDescription for transmission to the client, they should call the OFE(String, ModelNode) variant and provide some sort of normal message in addition to the ModelNode.

      Attachments

        Activity

          People

            bstansbe@redhat.com Brian Stansberry
            bstansbe@redhat.com Brian Stansberry
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: