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

try-catch block doesn't work if catch block doesn't contains anything

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 3.0.0.Beta18
    • None
    • CLI
    • None

    Description

      Try-catch block doesn't work if catch block doesn't contains anything

      Steps to reproduce:

      rm -f a.cli
      cat << EOF > a.cli
      try
        echo try-block
        /system-property=nonsence:read-resource()
      catch
        # echo catch-block
      end-try
      echo after-block
      EOF
      ./jboss-cli.sh  -c --file=a.cli
      

      Actual results:

      [mkopecky@dhcp-10-40-4-227 bin]$ ./jboss-cli.sh  -c --file=a.cli
      try-block
      {
          "outcome" => "failed",
          "failure-description" => "WFLYCTL0216: Management resource '[(\"system-property\" => \"nonsence\")]' not found",
          "rolled-back" => true
      }
      [mkopecky@dhcp-10-40-4-227 bin]$ 
      

      Expected results:

      [mkopecky@dhcp-10-40-4-227 bin]$ ./jboss-cli.sh  -c --file=a.cli
      try-block
      after-block
      [mkopecky@dhcp-10-40-4-227 bin]$ 
      

      Additional info:
      This issue is not regression

      Attachments

        Issue Links

          Activity

            People

              rhn-support-iweiss Ingo Weiss
              rhn-support-iweiss Ingo Weiss
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: