John Wagenleitner created GROOVY-8259:
-----------------------------------------

             Summary: add suppressed exceptions for with[Auto]Closeable methods
                 Key: GROOVY-8259
                 URL: https://issues.apache.org/jira/browse/GROOVY-8259
             Project: Groovy
          Issue Type: Improvement
          Components: groovy-runtime
    Affects Versions: 2.5.0-beta-1
            Reporter: John Wagenleitner
            Assignee: John Wagenleitner
            Priority: Minor


As with the try-with-resources statement, if multiple exceptions are thrown the 
exception from the closure should be returned and the exception from closing 
should be added as a suppressed exception.

Currently the withCloseable/withAutoCloseable method return the closure 
exception and log a warning if an exception is thrown on the call to 
{{close()}}.  With this improvement the exception from {{close()}} would also 
be added as a suppressed exception to the exception thrown from the closure.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to