Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-1534

Exception thrown in an overriden setProperty() trapped

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • None
    • 1.0-RC-1
    • None
    • None

    Description

      When throwing an exception in the overriden setProperty() of a GroovyObject, the exception is trapped and not rethrown appropriately.
      The following example exhibits the problem:

      class Foo {
      def visited = false
      def setPar(val)

      { visited = true throw new RuntimeException("bad") }

      }

      def foo = new Foo(par:null)
      assert foo.visited == false

      Attachments

        Activity

          People

            blackdrag Jochen Theodorou
            guillaume Guillaume Sauthier
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: