groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Wagenleitner (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (GROOVY-8259) add suppressed exceptions for with[Auto]Closeable methods
Date Tue, 18 Jul 2017 02:02:00 GMT

     [ https://issues.apache.org/jira/browse/GROOVY-8259?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

John Wagenleitner resolved GROOVY-8259.
---------------------------------------
       Resolution: Fixed
    Fix Version/s: 2.5.0-beta-2

Proposed PR merged.

> 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
>             Fix For: 2.5.0-beta-2
>
>
> 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)

Mime
View raw message