juergen     01/03/09 06:47:14

  Modified:    src/webdav/server/org/apache/slide/webdav/method
                        WebdavMethod.java
  Log:
  return internalServerError in case of a Webdav method execution threw an exception 
and do a printStacktrace()
  
  Revision  Changes    Path
  1.14      +7 -7      
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/WebdavMethod.java
  
  Index: WebdavMethod.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/WebdavMethod.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- WebdavMethod.java 2001/03/07 18:21:16     1.13
  +++ WebdavMethod.java 2001/03/09 14:47:11     1.14
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/WebdavMethod.java,v
 1.13 2001/03/07 18:21:16 juergen Exp $
  - * $Revision: 1.13 $
  - * $Date: 2001/03/07 18:21:16 $
  + * $Header: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/WebdavMethod.java,v
 1.14 2001/03/09 14:47:11 juergen Exp $
  + * $Revision: 1.14 $
  + * $Date: 2001/03/09 14:47:11 $
    *
    * ====================================================================
    *
  @@ -327,11 +327,11 @@
                   transactionIsStarted = false;
               }
           } catch (WebdavException ex) {
  -//          System.out.println("ERROR");
  -//          throw ex;
  +            // ignore the WebDav Exception and assume that the response code is 
already set.
           } catch (Exception ex) {
  -            resp.setStatus(WebdavStatus.SC_METHOD_FAILURE);
  -            throw new WebdavException(WebdavStatus.SC_METHOD_FAILURE);
  +            ex.printStackTrace();
  +            resp.setStatus(WebdavStatus.SC_INTERNAL_SERVER_ERROR);
  +            throw new WebdavException(WebdavStatus.SC_INTERNAL_SERVER_ERROR);
           } finally {
               if (transactionIsStarted && methodNeedsTransactionSupport()) {
                   // something went wrong, we are here and the TA is still open
  
  
  

Reply via email to