From 5dfc9fa6524211f32349464146215cc6451d415a Mon Sep 17 00:00:00 2001 From: "Jesse N. Glick" Date: Wed, 28 Dec 2005 00:06:00 +0000 Subject: [PATCH] More helpful error message. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@359327 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/org/apache/tools/ant/DirectoryScanner.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/org/apache/tools/ant/DirectoryScanner.java b/src/main/org/apache/tools/ant/DirectoryScanner.java index 6addded07..95ef0fe41 100644 --- a/src/main/org/apache/tools/ant/DirectoryScanner.java +++ b/src/main/org/apache/tools/ant/DirectoryScanner.java @@ -1312,7 +1312,7 @@ public class DirectoryScanner */ public synchronized String[] getIncludedFiles() { if (filesIncluded == null) { - throw new IllegalStateException(); + throw new IllegalStateException("Must call scan() first"); } String[] files = new String[filesIncluded.size()]; filesIncluded.copyInto(files); @@ -1327,7 +1327,7 @@ public class DirectoryScanner */ public synchronized int getIncludedFilesCount() { if (filesIncluded == null) { - throw new IllegalStateException(); + throw new IllegalStateException("Must call scan() first"); } return filesIncluded.size(); } @@ -1395,7 +1395,7 @@ public class DirectoryScanner */ public synchronized String[] getIncludedDirectories() { if (dirsIncluded == null) { - throw new IllegalStateException(); + throw new IllegalStateException("Must call scan() first"); } String[] directories = new String[dirsIncluded.size()]; dirsIncluded.copyInto(directories); @@ -1410,7 +1410,7 @@ public class DirectoryScanner */ public synchronized int getIncludedDirsCount() { if (dirsIncluded == null) { - throw new IllegalStateException(); + throw new IllegalStateException("Must call scan() first"); } return dirsIncluded.size(); }