From f1e9c972fbead168a235951d50d3727bcc8fdf8c Mon Sep 17 00:00:00 2001 From: Peter Reilly Date: Tue, 17 Apr 2007 14:53:20 +0000 Subject: [PATCH] bugzilla: 42142 add name of missing archive for zipfileset git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@529630 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/org/apache/tools/ant/taskdefs/Unpack.java | 13 +++++++++---- .../org/apache/tools/ant/types/ArchiveFileSet.java | 6 ++++-- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/Unpack.java b/src/main/org/apache/tools/ant/taskdefs/Unpack.java index a801d0109..9cfbc4b57 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Unpack.java +++ b/src/main/org/apache/tools/ant/taskdefs/Unpack.java @@ -83,16 +83,21 @@ public abstract class Unpack extends Task { */ public void setSrcResource(Resource src) { if (!src.isExists()) { - throw new BuildException("the archive doesn't exist"); + throw new BuildException( + "the archive " + src.getName() + " doesn't exist"); } if (src.isDirectory()) { - throw new BuildException("the archive can't be a directory"); + throw new BuildException( + "the archive " + src.getName() + " can't be a directory"); } if (src instanceof FileResource) { source = ((FileResource) src).getFile(); } else if (!supportsNonFileResources()) { - throw new BuildException("Only FileSystem resources are" - + " supported."); + throw new BuildException( + "The source " + src.getName() + + " is not a FileSystem " + + "Only FileSystem resources are" + + " supported."); } srcResource = src; } diff --git a/src/main/org/apache/tools/ant/types/ArchiveFileSet.java b/src/main/org/apache/tools/ant/types/ArchiveFileSet.java index 40271c05a..278038924 100755 --- a/src/main/org/apache/tools/ant/types/ArchiveFileSet.java +++ b/src/main/org/apache/tools/ant/types/ArchiveFileSet.java @@ -242,10 +242,12 @@ public abstract class ArchiveFileSet extends FileSet { return super.getDirectoryScanner(p); } if (!src.isExists()) { - throw new BuildException("the archive doesn't exist"); + throw new BuildException( + "the archive " + src.getName() + " doesn't exist"); } if (src.isDirectory()) { - throw new BuildException("the archive can't be a directory"); + throw new BuildException("the archive " + src.getName() + + " can't be a directory"); } ArchiveScanner as = newArchiveScanner(); as.setSrc(src);