[jboss-cvs] jboss-seam/src/main/org/jboss/seam/web ...

Shane Bryzak sbryzak at redhat.com
Wed May 16 20:36:38 EDT 2007


  User: sbryzak2
  Date: 07/05/16 20:36:38

  Modified:    src/main/org/jboss/seam/web   MultipartRequest.java
  Added:       src/main/org/jboss/seam/web   FileUploadException.java
  Log:
  JBSEAM-1329
  
  Revision  Changes    Path
  1.11      +4 -4      jboss-seam/src/main/org/jboss/seam/web/MultipartRequest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: MultipartRequest.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/web/MultipartRequest.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -b -r1.10 -r1.11
  --- MultipartRequest.java	16 May 2007 07:23:28 -0000	1.10
  +++ MultipartRequest.java	17 May 2007 00:36:38 -0000	1.11
  @@ -162,7 +162,7 @@
            }
            catch (IOException ex)
            {
  -            throw new RuntimeException("Could not create temporary file");
  +            throw new FileUploadException("Could not create temporary file");
            }
         }
         
  @@ -277,7 +277,7 @@
         if (contentLength != null && maxRequestSize > 0 && 
                  Integer.parseInt(contentLength) > maxRequestSize)
         {
  -         throw new RuntimeException("Multipart request is larger than allowed size");
  +         throw new FileUploadException("Multipart request is larger than allowed size");
         }
      }
   
  @@ -286,7 +286,7 @@
         byte[] boundaryMarker = getBoundaryMarker(request.getContentType());
         if (boundaryMarker == null)
         {
  -         throw new RuntimeException("the request was rejected because "
  +         throw new FileUploadException("The request was rejected because "
                     + "no multipart boundary was found");
         }
         
  @@ -424,7 +424,7 @@
         }
         catch (IOException ex)
         {
  -         throw new RuntimeException("IO Error parsing multipart request", ex);
  +         throw new FileUploadException("IO Error parsing multipart request", ex);
         }
      }
      
  
  
  
  1.1      date: 2007/05/17 00:36:38;  author: sbryzak2;  state: Exp;jboss-seam/src/main/org/jboss/seam/web/FileUploadException.java
  
  Index: FileUploadException.java
  ===================================================================
  package org.jboss.seam.web;
  
  /**
   * Thrown when an exception occurs while uploading a file. 
   *  
   * @author Shane Bryzak
   */
  public class FileUploadException extends RuntimeException
  {   
     public FileUploadException()
     {
        this(null, null);
     }
     
     public FileUploadException(String message)
     {
        this(message, null);
     }
     
     public FileUploadException(String message, Throwable cause)
     {
        super(message, cause);
     }   
  }
  
  
  



More information about the jboss-cvs-commits mailing list