[JIRA] (JENKINS-60308) CompositeIOException is unhelpful for diagnostics

4 views
Skip to first unread message

jnord@cloudbees.com (JIRA)

unread,
Nov 27, 2019, 12:48:02 PM11/27/19
to jenkinsc...@googlegroups.com
James Nord updated an issue
 
Jenkins / Bug JENKINS-60308
CompositeIOException is unhelpful for diagnostics
Change By: James Nord
Summary: CompositeIoException CompositeIOException is unhelpful for diagnostics
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

jnord@cloudbees.com (JIRA)

unread,
Nov 27, 2019, 7:17:04 PM11/27/19
to jenkinsc...@googlegroups.com
James Nord commented on Bug JENKINS-60308
 
Re: CompositeIOException is unhelpful for diagnostics

this is highly obvious in the TestHarness code https://github.com/jenkinsci/jenkins-test-harness/blob/e72678d347373228b6d81097d792e968376a6aa1/src/main/java/org/jvnet/hudson/test/TemporaryDirectoryAllocator.java#L87-L97 

    /**
     * Deletes all allocated temporary directories.
     */
    public synchronized void dispose() throws IOException, InterruptedException {
        IOException x = null;
        for (File dir : tmpDirectories)
            try {
                new FilePath(dir).deleteRecursive();
            } catch (IOException e) {
                x = e;
            }
        tmpDirectories.clear();
        if (x!=null)    throw new IOException("Failed to clean up temp dirs",x);
    }

the IoException causes the actual cause to be lost (and only the most recent one is throw,)  this specific case can be fixed by actually throwing a CompositeIOException - but we can not control all the code that catches and handles exceptions.

jglick@cloudbees.com (JIRA)

unread,
Jan 22, 2020, 3:57:03 PM1/22/20
to jenkinsc...@googlegroups.com
Jesse Glick resolved as Duplicate
 

Fixed as part of JENKINS-60716.

Change By: Jesse Glick
Status: Open Resolved
Resolution: Duplicate
Reply all
Reply to author
Forward
0 new messages