rana_b 02/04/01 09:27:30
Modified: ftpserver/src/java/org/apache/avalon/ftpserver
BaseFtpConnection.java
Log:
proper exception handling
Revision Changes Path
1.2 +13 -0
jakarta-avalon-apps/ftpserver/src/java/org/apache/avalon/ftpserver/BaseFtpConnection.java
Index: BaseFtpConnection.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-apps/ftpserver/src/java/org/apache/avalon/ftpserver/BaseFtpConnection.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- BaseFtpConnection.java 31 Mar 2002 16:37:58 -0000 1.1
+++ BaseFtpConnection.java 1 Apr 2002 17:27:30 -0000 1.2
@@ -131,10 +131,23 @@
catch(NoSuchMethodException ex) {
writer.write(mFtpStatus.getResponse(502, request, mUser, null));
}
+ catch(InvocationTargetException ex) {
+ writer.write(mFtpStatus.getResponse(500, request, mUser, null));
+ Throwable th = ex.getTargetException();
+ if (th instanceof java.io.IOException) {
+ throw (IOException)th;
+ }
+ else {
+ mConfig.getLogger().warn("BaseFtpConnection.service()", th);
+ }
+ }
catch(Exception ex) {
writer.write(mFtpStatus.getResponse(500, request, mUser, null));
if (ex instanceof java.io.IOException) {
throw (IOException)ex;
+ }
+ else {
+ mConfig.getLogger().warn("BaseFtpConnection.service()", ex);
}
}
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>