Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-10496

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 7.1.0.DR18
    • 7.1.0.DR16
    • 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
              mkopecky@redhat.com Marek Kopecky
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 30 minutes Original Estimate - 30 minutes
                  30m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour
                  1h