sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r614552 - in /incubator/sling/trunk/sling/servlets-standard/src/main/java/org/apache/sling/servlets/standard: FileServlet.java FolderServlet.java ReferenceServlet.java
Date Wed, 23 Jan 2008 14:39:38 GMT
Author: fmeschbe
Date: Wed Jan 23 06:39:34 2008
New Revision: 614552

URL: http://svn.apache.org/viewvc?rev=614552&view=rev
Log:
SLING-186 Fix exception handling

Modified:
    incubator/sling/trunk/sling/servlets-standard/src/main/java/org/apache/sling/servlets/standard/FileServlet.java
    incubator/sling/trunk/sling/servlets-standard/src/main/java/org/apache/sling/servlets/standard/FolderServlet.java
    incubator/sling/trunk/sling/servlets-standard/src/main/java/org/apache/sling/servlets/standard/ReferenceServlet.java

Modified: incubator/sling/trunk/sling/servlets-standard/src/main/java/org/apache/sling/servlets/standard/FileServlet.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/sling/servlets-standard/src/main/java/org/apache/sling/servlets/standard/FileServlet.java?rev=614552&r1=614551&r2=614552&view=diff
==============================================================================
--- incubator/sling/trunk/sling/servlets-standard/src/main/java/org/apache/sling/servlets/standard/FileServlet.java
(original)
+++ incubator/sling/trunk/sling/servlets-standard/src/main/java/org/apache/sling/servlets/standard/FileServlet.java
Wed Jan 23 06:39:34 2008
@@ -47,7 +47,7 @@
         Resource resource = request.getResource();
         FileObject file = resource.adaptTo(FileObject.class);
         if (file == null) {
-            throw new SlingException("Missing mapped object for file "
+            throw new ServletException("Missing mapped object for file "
                 + resource.getPath());
         }
 
@@ -58,7 +58,7 @@
             RequestDispatcher rd = request.getRequestDispatcher(jcrContent);
             rd.include(request, response);
         } else {
-            throw new SlingException("File " + resource.getPath()
+            throw new ServletException("File " + resource.getPath()
                 + " has no content");
         }
     }

Modified: incubator/sling/trunk/sling/servlets-standard/src/main/java/org/apache/sling/servlets/standard/FolderServlet.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/sling/servlets-standard/src/main/java/org/apache/sling/servlets/standard/FolderServlet.java?rev=614552&r1=614551&r2=614552&view=diff
==============================================================================
--- incubator/sling/trunk/sling/servlets-standard/src/main/java/org/apache/sling/servlets/standard/FolderServlet.java
(original)
+++ incubator/sling/trunk/sling/servlets-standard/src/main/java/org/apache/sling/servlets/standard/FolderServlet.java
Wed Jan 23 06:39:34 2008
@@ -48,7 +48,7 @@
         Resource resource = request.getResource();
         FolderObject content = resource.adaptTo(FolderObject.class);
         if (content == null) {
-            throw new SlingException("Missing mapped object for folder "
+            throw new ServletException("Missing mapped object for folder "
                 + resource.getPath());
         }
 

Modified: incubator/sling/trunk/sling/servlets-standard/src/main/java/org/apache/sling/servlets/standard/ReferenceServlet.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/sling/servlets-standard/src/main/java/org/apache/sling/servlets/standard/ReferenceServlet.java?rev=614552&r1=614551&r2=614552&view=diff
==============================================================================
--- incubator/sling/trunk/sling/servlets-standard/src/main/java/org/apache/sling/servlets/standard/ReferenceServlet.java
(original)
+++ incubator/sling/trunk/sling/servlets-standard/src/main/java/org/apache/sling/servlets/standard/ReferenceServlet.java
Wed Jan 23 06:39:34 2008
@@ -55,7 +55,7 @@
             RequestDispatcher rd = request.getRequestDispatcher(target);
             rd.include(request, response);
         } else {
-            throw new SlingException("No content for path " + path);
+            throw new ServletException("No content for path " + path);
         }
     }
 }



Mime
View raw message