Author: maartenc
Date: Tue Apr 1 15:03:58 2008
New Revision: 643614
URL: http://svn.apache.org/viewvc?rev=643614&view=rev
Log:
FIX: SFTPRepository.list(String) hides exceptions (IVY-751)
Modified:
ant/ivy/core/trunk/CHANGES.txt
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/sftp/SFTPRepository.java
Modified: ant/ivy/core/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/ant/ivy/core/trunk/CHANGES.txt?rev=643614&r1=643613&r2=643614&view=diff
==============================================================================
--- ant/ivy/core/trunk/CHANGES.txt (original)
+++ ant/ivy/core/trunk/CHANGES.txt Tue Apr 1 15:03:58 2008
@@ -75,6 +75,7 @@
- IMPROVEMENT: Parse description and home page from poms (IVY-767)
- IMPROVEMENT: Smarter determination if an expression is exact or not for
RegexpPatternMatcher and GlobPatternMatcher
+- FIX: SFTPRepository.list(String) hides exceptions (IVY-751)
- FIX: Wrong error message for republishing a module (IVY-752)
- FIX: resolve fails to put metadata in cache (IVY-779)
- FIX: multiple cleancache and inline retrieve error (IVY-778)
Modified:
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/sftp/SFTPRepository.java
URL:
http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/sftp/SFTPRepository.java?rev=643614&r1=643613&r2=643614&view=diff
==============================================================================
---
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/sftp/SFTPRepository.java
(original)
+++
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/sftp/SFTPRepository.java
Tue Apr 1 15:03:58 2008
@@ -109,7 +109,6 @@
try {
return c.get(resource.getName());
} catch (SftpException e) {
- e.printStackTrace();
IOException ex = new IOException("impossible to open stream for "
+ resource + " on "
+ getHost() + (e.getMessage() != null ? ": " +
e.getMessage() : ""));
ex.initCause(e);
@@ -123,7 +122,6 @@
try {
c.get(source, destination.getAbsolutePath(), new
MyProgressMonitor());
} catch (SftpException e) {
- e.printStackTrace();
IOException ex = new IOException("impossible to get " + source + "
on " + getHost()
+ (e.getMessage() != null ? ": " + e.getMessage() : ""));
ex.initCause(e);
@@ -186,8 +184,10 @@
}
return result;
}
- } catch (Exception e) {
- // silent fail, return null listing
+ } catch (SftpException e) {
+ IOException ex = new IOException("Failed to return a listing for
'" + parent + "'");
+ ex.initCause(e);
+ throw ex;
}
return null;
}