Author: pete.muir(a)jboss.org
Date: 2008-01-25 07:54:42 -0500 (Fri, 25 Jan 2008)
New Revision: 7231
Modified:
trunk/src/main/org/jboss/seam/deployment/URLScanner.java
Log:
Better error handling
Modified: trunk/src/main/org/jboss/seam/deployment/URLScanner.java
===================================================================
--- trunk/src/main/org/jboss/seam/deployment/URLScanner.java 2008-01-25 12:52:56 UTC (rev
7230)
+++ trunk/src/main/org/jboss/seam/deployment/URLScanner.java 2008-01-25 12:54:42 UTC (rev
7231)
@@ -9,6 +9,7 @@
import java.util.HashSet;
import java.util.Set;
import java.util.zip.ZipEntry;
+import java.util.zip.ZipException;
import java.util.zip.ZipFile;
import org.jboss.seam.log.LogProvider;
@@ -107,15 +108,22 @@
private void handleArchiveByFile(File file) throws IOException
{
- log.debug("archive: " + file);
- ZipFile zip = new ZipFile(file);
- Enumeration<? extends ZipEntry> entries = zip.entries();
- while ( entries.hasMoreElements() )
+ try
{
- ZipEntry entry = entries.nextElement();
- String name = entry.getName();
- handleItem(name);
+ log.debug("archive: " + file);
+ ZipFile zip = new ZipFile(file);
+ Enumeration<? extends ZipEntry> entries = zip.entries();
+ while ( entries.hasMoreElements() )
+ {
+ ZipEntry entry = entries.nextElement();
+ String name = entry.getName();
+ handleItem(name);
+ }
}
+ catch (ZipException e)
+ {
+ throw new RuntimeException("Error handling file " + file, e);
+ }
}
private void handleDirectory(File file, String path)
Show replies by date