Buggy code:
public class JMSTopicControlHandler extends AbstractRuntimeOnlyHandler { public static final JMSTopicControlHandler INSTANCE = new JMSTopicControlHandler ( ) ; public static final String LIST_ALL_SUBSCRIPTIONS = "list-all-subscriptions" ; public static final String LIST_ALL_SUBSCRIPTIONS_AS_JSON = "list-all-subscriptions-as-json" ; public static final String LIST_DURABLE_SUBSCRIPTIONS = "list-durable-subscriptions" ; public static final String LIST_DURABLE_SUBSCRIPTIONS_AS_JSON = "list-durable-subscriptions-as-json" ; public static final String LIST_NON_DURABLE_SUBSCRIPTIONS = "list-non-durable-subscriptions" ; public static final String LIST_NON_DURABLE_SUBSCRIPTIONS_AS_JSON = "list-non-durable-subscriptions-as-json" ; public static final String LIST_MESSAGES_FOR_SUBSCRIPTION = "list-messages-for-subscription" ; public static final String LIST_MESSAGES_FOR_SUBSCRIPTION_AS_JSON = "list-messages-for-subscription-as-json" ; public static final String COUNT_MESSAGES_FOR_SUBSCRIPTION = "count-messages-for-subscription" ; public static final String SUBSCRIPTION_NAME = "subscription-name" ; public static final String DROP_DURABLE_SUBSCRIPTION = "drop-durable-subscription" ; public static final String DROP_ALL_SUBSCRIPTIONS = "drop-all-subscriptions" ; public static final String REMOVE_MESSAGES = "remove-messages" ; private static final String TOPIC = "jms-topic" ; private final ParametersValidator listMessagesForSubscriptionValidator = new ParametersValidator ( ) ; private final ParametersValidator countMessagesForSubscriptionValidator = new ParametersValidator ( ) ; private final ParametersValidator dropDurableSubscriptionValidator = new ParametersValidator ( ) ; private final ParametersValidator removeMessagesValidator = new ParametersValidator ( ) ; private JMSTopicControlHandler ( ) { } public void registerOperations ( final ManagementResourceRegistration registry ) { } @ Override protected void executeRuntimeStep ( OperationContext context , ModelNode operation ) throws OperationFailedException { final ServiceName hqServiceName = MessagingServices . getHornetQServiceName ( PathAddress . pathAddress ( operation . get ( OP_ADDR ) ) ) ; final String operationName = operation . require ( OP ) . asString ( ) ; final String topicName = PathAddress . pathAddress ( operation . require ( OP_ADDR ) ) . getLastElement ( ) . getValue ( ) ; ServiceController < ? > hqService = context . getServiceRegistry ( false ) . getService ( hqServiceName ) ; HornetQServer hqServer = HornetQServer . class . cast ( hqService . getValue ( ) ) ; TopicControl control = TopicControl . class . cast ( hqServer . getManagementService ( ) . getResource ( ( ( ResourceNames . JMS_TOPIC ) + topicName ) ) ) ; try { if ( JMSTopicControlHandler . LIST_ALL_SUBSCRIPTIONS . equals ( operationName ) ) { String json = control . listAllSubscriptionsAsJSON ( ) ; ModelNode jsonAsNode = ModelNode . fromJSONString ( json ) ; context . getResult ( ) . set ( jsonAsNode ) ; } else if ( JMSTopicControlHandler . LIST_ALL_SUBSCRIPTIONS_AS_JSON . equals ( operationName ) ) { context . getResult ( ) . set ( control . listAllSubscriptionsAsJSON ( ) ) ; } else if ( JMSTopicControlHandler . LIST_DURABLE_SUBSCRIPTIONS . equals ( operationName ) ) { String json = control . listDurableSubscriptionsAsJSON ( ) ; ModelNode jsonAsNode = ModelNode . fromJSONString ( json ) ; context . getResult ( ) . set ( jsonAsNode ) ; } else if ( JMSTopicControlHandler . LIST_DURABLE_SUBSCRIPTIONS_AS_JSON . equals ( operationName ) ) { context . getResult ( ) . set ( control . listDurableSubscriptionsAsJSON ( ) ) ; } else if ( JMSTopicControlHandler . LIST_NON_DURABLE_SUBSCRIPTIONS . equals ( operationName ) ) { String json = control . listNonDurableSubscriptionsAsJSON ( ) ; ModelNode jsonAsNode = ModelNode . fromJSONString ( json ) ; context . getResult ( ) . set ( jsonAsNode ) ; } else if ( JMSTopicControlHandler . LIST_NON_DURABLE_SUBSCRIPTIONS_AS_JSON . equals ( operationName ) ) { context . getResult ( ) . set ( control . listNonDurableSubscriptionsAsJSON ( ) ) ; } else if ( JMSTopicControlHandler . LIST_MESSAGES_FOR_SUBSCRIPTION . equals ( operationName ) ) { listMessagesForSubscriptionValidator . validate ( operation ) ; final String queueName = operation . require ( QUEUE_NAME . getName ( ) ) . asString ( ) ; String json = control . listMessagesForSubscriptionAsJSON ( queueName ) ; context . getResult ( ) . set ( ModelNode . fromJSONString ( json ) ) ; } else if ( JMSTopicControlHandler . LIST_MESSAGES_FOR_SUBSCRIPTION_AS_JSON . equals ( operationName ) ) { final String queueName = operation . require ( QUEUE_NAME . getName ( ) ) . asString ( ) ; context . getResult ( ) . set ( control . listMessagesForSubscriptionAsJSON ( queueName ) ) ; } else if ( JMSTopicControlHandler . COUNT_MESSAGES_FOR_SUBSCRIPTION . equals ( operationName ) ) { countMessagesForSubscriptionValidator . validate ( operation ) ; String clientId = operation . require ( CLIENT_ID . getName ( ) ) . asString ( ) ; String subscriptionName = operation . require ( JMSTopicControlHandler . SUBSCRIPTION_NAME ) . asString ( ) ; String filter = ( operation . hasDefined ( FILTER . getName ( ) ) ) ? operation . get ( FILTER . getName ( ) ) . asString ( ) : null ; context . getResult ( ) . set ( control . countMessagesForSubscription ( clientId , subscriptionName , filter ) ) ; } else if ( JMSTopicControlHandler . DROP_DURABLE_SUBSCRIPTION . equals ( operationName ) ) { dropDurableSubscriptionValidator . validate ( operation ) ; String clientId = operation . require ( CLIENT_ID . getName ( ) ) . asString ( ) ; String subscriptionName = operation . require ( JMSTopicControlHandler . SUBSCRIPTION_NAME ) . asString ( ) ; control . dropDurableSubscription ( clientId , subscriptionName ) ; context . getResult ( ) ; } else if ( JMSTopicControlHandler . DROP_ALL_SUBSCRIPTIONS . equals ( operationName ) ) { control . dropAllSubscriptions ( ) ; context . getResult ( ) ; } else if ( JMSTopicControlHandler . REMOVE_MESSAGES . equals ( operationName ) ) { removeMessagesValidator . validate ( operation ) ; String filter = ( operation . hasDefined ( FILTER . getName ( ) ) ) ? operation . get ( FILTER . getName ( ) ) . asString ( ) : null ; context . getResult ( ) . set ( control . removeMessages ( filter ) ) ; } else { throw MessagingMessages . MESSAGES . unsupportedOperation ( operationName ) ; } } catch ( RuntimeException e ) { throw e ; } catch ( Exception e ) { <START_BUG> context . getFailureDescription ( ) . set ( e . getLocalizedMessage ( ) ) ; <END_BUG> } context . completeStep ( ) ; } }

Fix:
context . getFailureDescription ( ) . set ( e . toString ( ) ) ;