code: @Override
      protected void doHandle(CommandContext ctx) throws CommandLineException {
  
          final BatchManager batchManager = ctx.getBatchManager();
          if(batchManager.isBatchActive()) {
              throw new CommandFormatException("try is not allowed while in batch mode.");
          }
          ctx.registerRedirection(new TryCatchFinallyControlFlow(ctx));
      }
docs: /* (non-Javadoc)
  @see org.jboss.as.cli.handlers.CommandHandlerWithHelp#doHandle(org.jboss.as.cli.CommandContext)