[pal-cvs 3037] [781] catch exception.

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2008年 1月 15日 (火) 07:44:05 JST


Revision: 781
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=pal&view=rev&rev=781
Author:   shinsuke
Date:     2008-01-15 07:44:04 +0900 (Tue, 15 Jan 2008)

Log Message:
-----------
catch exception.

Modified Paths:
--------------
    pal-admin/trunk/src/main/java/jp/sf/pal/admin/logic/SiteEditorLogic.java


-------------- next part --------------
Modified: pal-admin/trunk/src/main/java/jp/sf/pal/admin/logic/SiteEditorLogic.java
===================================================================
--- pal-admin/trunk/src/main/java/jp/sf/pal/admin/logic/SiteEditorLogic.java	2008-01-14 22:42:58 UTC (rev 780)
+++ pal-admin/trunk/src/main/java/jp/sf/pal/admin/logic/SiteEditorLogic.java	2008-01-14 22:44:04 UTC (rev 781)
@@ -283,18 +283,10 @@
                 }
             }
             return treeList;
-        } catch (FolderNotFoundException e) {
+        } catch (Exception e) {
             logger.error("Could not access a folder: " + path, e);
             throw new CommonException("could.not.access.folder",
                     "Could not access a folder: " + path, e);
-        } catch (InvalidFolderException e) {
-            logger.error("Could not access a folder: " + path, e);
-            throw new CommonException("could.not.access.folder",
-                    "Could not access a folder: " + path, e);
-        } catch (NodeException e) {
-            logger.error("Could not access a folder: " + path, e);
-            throw new CommonException("could.not.access.folder",
-                    "Could not access a folder: " + path, e);
         }
 
     }
@@ -628,18 +620,10 @@
                 map.put("value", value.getName());
                 list.add(map);
             }
-        } catch (UnsupportedDocumentTypeException e) {
+        } catch (Exception e) {
             logger.error("Could not access a page security. ", e);
             throw new CommonException("could.not.access.page.security",
                     "Could not access a page security. ", e);
-        } catch (DocumentNotFoundException e) {
-            logger.error("Could not access a page security. ", e);
-            throw new CommonException("could.not.access.page.security",
-                    "Could not access a page security. ", e);
-        } catch (NodeException e) {
-            logger.error("Could not access a page security. ", e);
-            throw new CommonException("could.not.access.page.security",
-                    "Could not access a page security. ", e);
         }
         return list;
     }
@@ -891,26 +875,10 @@
                 // folder
                 return null;
             }
-        } catch (PageNotFoundException e) {
+        } catch (Exception e) {
             logger.error("Could not access a page: " + path, e);
             throw new CommonException("could.not.access.page",
                     "Could not access a page: " + path, e);
-        } catch (FolderNotFoundException e) {
-            logger.error("Could not access a page: " + path, e);
-            throw new CommonException("could.not.access.page",
-                    "Could not access a page: " + path, e);
-        } catch (InvalidFolderException e) {
-            logger.error("Could not access a page: " + path, e);
-            throw new CommonException("could.not.access.page",
-                    "Could not access a page: " + path, e);
-        } catch (DocumentException e) {
-            logger.error("Could not access a page: " + path, e);
-            throw new CommonException("could.not.access.page",
-                    "Could not access a page: " + path, e);
-        } catch (NodeException e) {
-            logger.error("Could not access a page: " + path, e);
-            throw new CommonException("could.not.access.page",
-                    "Could not access a page: " + path, e);
         }
     }
 
@@ -932,12 +900,9 @@
         try {
             getPageManager().updatePage(page);
             getPageManager().reset();
-        } catch (PageNotUpdatedException e) {
+        } catch (Exception e) {
             throw new CommonException("could.not.update.page",
                     "Could not update a page: " + path, e);
-        } catch (NodeException e) {
-            throw new CommonException("could.not.update.page",
-                    "Could not update a page: " + path, e);
         }
     }
 
@@ -956,12 +921,9 @@
         try {
             getPageManager().removePage(page);
             getPageManager().reset();
-        } catch (PageNotUpdatedException e) {
+        } catch (Exception e) {
             throw new CommonException("could.not.delete.page",
                     "Could not delete a page: " + path, e);
-        } catch (NodeException e) {
-            throw new CommonException("could.not.delete.page",
-                    "Could not delete a page: " + path, e);
         }
         return parentPath;
     }
@@ -994,12 +956,9 @@
         try {
             getPageManager().updatePage(childPage);
             getPageManager().reset();
-        } catch (PageNotUpdatedException e) {
+        } catch (Exception e) {
             throw new CommonException("could.not.add.page",
                     "Could not add a page: " + path, e);
-        } catch (NodeException e) {
-            throw new CommonException("could.not.add.page",
-                    "Could not add a page: " + path, e);
         }
 
         List<String> orderList = folder.getDocumentOrder();
@@ -1011,12 +970,9 @@
                 try {
                     getPageManager().updateFolder(folder);
                     getPageManager().reset();
-                } catch (FolderNotUpdatedException e) {
+                } catch (Exception e) {
                     throw new CommonException("could.not.change.page.order",
                             "Could not change a page order: " + path, e);
-                } catch (NodeException e) {
-                    throw new CommonException("could.not.change.page.order",
-                            "Could not change a page order: " + path, e);
                 }
             }
         }
@@ -1067,22 +1023,10 @@
                 // folder
                 return folder.getFolder(names[names.length - 1]);
             }
-        } catch (FolderNotFoundException e) {
+        } catch (Exception e) {
             logger.error("Could not access a folder: " + path, e);
             throw new CommonException("could.not.access.folder",
                     "Could not access a folder: " + path, e);
-        } catch (InvalidFolderException e) {
-            logger.error("Could not access a folder: " + path, e);
-            throw new CommonException("could.not.access.folder",
-                    "Could not access a folder: " + path, e);
-        } catch (DocumentException e) {
-            logger.error("Could not access a folder: " + path, e);
-            throw new CommonException("could.not.access.folder",
-                    "Could not access a folder: " + path, e);
-        } catch (NodeException e) {
-            logger.error("Could not access a folder: " + path, e);
-            throw new CommonException("could.not.access.folder",
-                    "Could not access a folder: " + path, e);
         }
     }
 
@@ -1105,12 +1049,9 @@
         try {
             getPageManager().updateFolder(folder);
             getPageManager().reset();
-        } catch (PageNotUpdatedException e) {
+        } catch (Exception e) {
             throw new CommonException("could.not.update.folder",
                     "Could not update a folder: " + path, e);
-        } catch (NodeException e) {
-            throw new CommonException("could.not.update.folder",
-                    "Could not update a folder: " + path, e);
         }
     }
 
@@ -1133,12 +1074,9 @@
         try {
             getPageManager().removeFolder(folder);
             getPageManager().reset();
-        } catch (PageNotUpdatedException e) {
+        } catch (Exception e) {
             throw new CommonException("could.not.delete.folder",
                     "Could not update a folder: " + path, e);
-        } catch (NodeException e) {
-            throw new CommonException("could.not.delete.folder",
-                    "Could not update a folder: " + path, e);
         }
 
         return parentPath;
@@ -1196,12 +1134,9 @@
         try {
             getPageManager().updateFolder(folder);
             getPageManager().reset();
-        } catch (PageNotUpdatedException e) {
+        } catch (Exception e) {
             throw new CommonException("could.not.update.document.order",
                     "Could not update a folder: " + path, e);
-        } catch (NodeException e) {
-            throw new CommonException("could.not.update.document.order",
-                    "Could not update a folder: " + path, e);
         }
     }
 
@@ -1241,12 +1176,9 @@
         try {
             getPageManager().updateFolder(folder);
             getPageManager().reset();
-        } catch (PageNotUpdatedException e) {
+        } catch (Exception e) {
             throw new CommonException("could.not.update.document.order",
                     "Could not update a folder: " + path, e);
-        } catch (NodeException e) {
-            throw new CommonException("could.not.update.document.order",
-                    "Could not update a folder: " + path, e);
         }
     }
 
@@ -1276,12 +1208,9 @@
         try {
             getPageManager().updateFolder(folder);
             getPageManager().reset();
-        } catch (PageNotUpdatedException e) {
+        } catch (Exception e) {
             throw new CommonException("could.not.add.document.order",
                     "Could not update a folder: " + path, e);
-        } catch (NodeException e) {
-            throw new CommonException("could.not.add.document.order",
-                    "Could not update a folder: " + path, e);
         }
     }
 
@@ -1310,12 +1239,9 @@
         try {
             getPageManager().updateFolder(folder);
             getPageManager().reset();
-        } catch (PageNotUpdatedException e) {
+        } catch (Exception e) {
             throw new CommonException("could.not.add.document.order",
                     "Could not update a folder: " + path, e);
-        } catch (NodeException e) {
-            throw new CommonException("could.not.add.document.order",
-                    "Could not update a folder: " + path, e);
         }
     }
 
@@ -1355,12 +1281,9 @@
         try {
             getPageManager().updateFolder(folder);
             getPageManager().reset();
-        } catch (PageNotUpdatedException e) {
+        } catch (Exception e) {
             throw new CommonException("could.not.add.metadata",
                     "Could not update a folder: " + path, e);
-        } catch (NodeException e) {
-            throw new CommonException("could.not.add.metadata",
-                    "Could not update a folder: " + path, e);
         }
     }
 
@@ -1403,12 +1326,9 @@
         try {
             getPageManager().updateFolder(folder);
             getPageManager().reset();
-        } catch (PageNotUpdatedException e) {
+        } catch (Exception e) {
             throw new CommonException("could.not.delete.metadata",
                     "Could not update a folder: " + path, e);
-        } catch (NodeException e) {
-            throw new CommonException("could.not.delete.metadata",
-                    "Could not update a folder: " + path, e);
         }
     }
 
@@ -1448,12 +1368,9 @@
         try {
             getPageManager().updatePage(page);
             getPageManager().reset();
-        } catch (PageNotUpdatedException e) {
+        } catch (Exception e) {
             throw new CommonException("could.not.add.metadata",
                     "Could not update a page: " + path, e);
-        } catch (NodeException e) {
-            throw new CommonException("could.not.add.metadata",
-                    "Could not update a page: " + path, e);
         }
     }
 
@@ -1496,12 +1413,9 @@
         try {
             getPageManager().updatePage(page);
             getPageManager().reset();
-        } catch (PageNotUpdatedException e) {
+        } catch (Exception e) {
             throw new CommonException("could.not.delete.metadata",
                     "Could not update a page: " + path, e);
-        } catch (NodeException e) {
-            throw new CommonException("could.not.delete.metadata",
-                    "Could not update a page: " + path, e);
         }
     }
 
@@ -1531,12 +1445,9 @@
         try {
             getPageManager().updateFolder(child);
             getPageManager().reset();
-        } catch (PageNotUpdatedException e) {
+        } catch (Exception e) {
             throw new CommonException("could.not.add.folder",
                     "Could not add a folder: " + path, e);
-        } catch (NodeException e) {
-            throw new CommonException("could.not.add.folder",
-                    "Could not add a folder: " + path, e);
         }
 
         // change a folder order
@@ -1549,12 +1460,9 @@
                 try {
                     getPageManager().updateFolder(folder);
                     getPageManager().reset();
-                } catch (FolderNotUpdatedException e) {
+                } catch (Exception e) {
                     throw new CommonException("could.not.change.folder.order",
                             "Could not change a folder order: " + path, e);
-                } catch (NodeException e) {
-                    throw new CommonException("could.not.change.folder.order",
-                            "Could not change a folder order: " + path, e);
                 }
             }
         }
@@ -1577,12 +1485,9 @@
         try {
             getPageManager().updatePage(childPage);
             getPageManager().reset();
-        } catch (PageNotUpdatedException e) {
+        } catch (Exception e) {
             throw new CommonException("could.not.add.default.page",
                     "Could not add a default page: " + path, e);
-        } catch (NodeException e) {
-            throw new CommonException("could.not.add.default.page",
-                    "Could not add a default page: " + path, e);
         }
 
         orderList = child.getDocumentOrder();
@@ -1594,14 +1499,10 @@
                 try {
                     getPageManager().updateFolder(child);
                     getPageManager().reset();
-                } catch (FolderNotUpdatedException e) {
+                } catch (Exception e) {
                     throw new CommonException(
                             "could.not.change.default.page.order",
                             "Could not change a default page order: " + path, e);
-                } catch (NodeException e) {
-                    throw new CommonException(
-                            "could.not.change.default.page.order",
-                            "Could not change a default page order: " + path, e);
                 }
             }
         }
@@ -1649,12 +1550,9 @@
         try {
             getPageManager().updatePage(page);
             getPageManager().reset();
-        } catch (PageNotUpdatedException e) {
+        } catch (Exception e) {
             throw new CommonException("could.not.update.layout",
                     "Could not update a layout: " + path, e);
-        } catch (NodeException e) {
-            throw new CommonException("could.not.update.layout",
-                    "Could not update a layout: " + path, e);
         }
 
         try {
@@ -1669,26 +1567,11 @@
 
             getPortletWindowAccessor().createPortletWindow(
                     portletWindow.getPortletEntity(), cfragment.getId());
-        } catch (PageNotFoundException e) {
+        } catch (Exception e) {
             throw new CommonException(
                     "updated.layout.but.could.not.update.cache",
                     "Update a layout configuration, but could not update a cache.: "
                             + path, e);
-        } catch (NodeException e) {
-            throw new CommonException(
-                    "updated.layout.but.could.not.update.cache",
-                    "Update a layout configuration, but could not update a cache.: "
-                            + path, e);
-        } catch (FailedToRetrievePortletWindow e) {
-            throw new CommonException(
-                    "updated.layout.but.could.not.update.cache",
-                    "Update a layout configuration, but could not update a cache.: "
-                            + path, e);
-        } catch (PortletEntityNotStoredException e) {
-            throw new CommonException(
-                    "updated.layout.but.could.not.update.cache",
-                    "Update a layout configuration, but could not update a cache.: "
-                            + path, e);
         }
 
     }
@@ -1718,12 +1601,9 @@
         try {
             getPageManager().updatePage(page);
             getPageManager().reset();
-        } catch (PageNotUpdatedException e) {
+        } catch (Exception e) {
             throw new CommonException("could.not.delete.layout",
                     "Could not delete a layout: " + path, e);
-        } catch (NodeException e) {
-            throw new CommonException("could.not.delete.layout",
-                    "Could not delete a layout: " + path, e);
         }
         return p;
     }
@@ -1763,12 +1643,9 @@
         try {
             getPageManager().updatePage(page);
             getPageManager().reset();
-        } catch (PageNotUpdatedException e) {
+        } catch (Exception e) {
             throw new CommonException("could.not.update.portlet",
                     "Could not update a page: " + path, e);
-        } catch (NodeException e) {
-            throw new CommonException("could.not.update.portlet",
-                    "Could not update a page: " + path, e);
         }
 
         try {
@@ -1783,26 +1660,11 @@
 
             getPortletWindowAccessor().createPortletWindow(
                     portletWindow.getPortletEntity(), cfragment.getId());
-        } catch (PageNotFoundException e) {
+        } catch (Exception e) {
             throw new CommonException(
                     "updated.portlet.but.could.not.update.cache",
                     "Update a portlet configuration, but could not update a cache.: "
                             + path, e);
-        } catch (NodeException e) {
-            throw new CommonException(
-                    "updated.portlet.but.could.not.update.cache",
-                    "Update a portlet configuration, but could not update a cache.: "
-                            + path, e);
-        } catch (FailedToRetrievePortletWindow e) {
-            throw new CommonException(
-                    "updated.portlet.but.could.not.update.cache",
-                    "Update a portlet configuration, but could not update a cache.: "
-                            + path, e);
-        } catch (PortletEntityNotStoredException e) {
-            throw new CommonException(
-                    "updated.portlet.but.could.not.update.cache",
-                    "Update a portlet configuration, but could not update a cache.: "
-                            + path, e);
         }
 
     }
@@ -1826,12 +1688,9 @@
         try {
             getPageManager().updatePage(page);
             getPageManager().reset();
-        } catch (PageNotUpdatedException e) {
+        } catch (Exception e) {
             throw new CommonException("could.not.delete.portlet",
                     "Could not delete a portlet: " + path, e);
-        } catch (NodeException e) {
-            throw new CommonException("could.not.delete.portlet",
-                    "Could not delete a portlet: " + path, e);
         }
         return p;
     }
@@ -1857,12 +1716,9 @@
         try {
             getPageManager().updatePage(page);
             getPageManager().reset();
-        } catch (PageNotUpdatedException e) {
+        } catch (Exception e) {
             throw new CommonException("could.not.add.layout",
                     "Could not update a page: " + path, e);
-        } catch (NodeException e) {
-            throw new CommonException("could.not.add.layout",
-                    "Could not update a page: " + path, e);
         }
     }
 
@@ -1887,12 +1743,9 @@
         try {
             getPageManager().updatePage(page);
             getPageManager().reset();
-        } catch (PageNotUpdatedException e) {
+        } catch (Exception e) {
             throw new CommonException("could.not.add.portlet",
                     "Could not update a page: " + path, e);
-        } catch (NodeException e) {
-            throw new CommonException("could.not.add.portlet",
-                    "Could not update a page: " + path, e);
         }
     }
 
@@ -2054,12 +1907,9 @@
         try {
             getPageManager().updatePage(page);
             getPageManager().reset();
-        } catch (PageNotUpdatedException e) {
+        } catch (Exception e) {
             throw new CommonException("could.not.update.page",
                     "Could not update a page: " + page.getPath(), e);
-        } catch (NodeException e) {
-            throw new CommonException("could.not.update.page",
-                    "Could not update a page: " + page.getPath(), e);
         }
     }
 
@@ -2074,12 +1924,9 @@
         try {
             getPageManager().updateFolder(folder);
             getPageManager().reset();
-        } catch (FolderNotUpdatedException e) {
+        } catch (Exception e) {
             throw new CommonException("could.not.update.folder",
                     "Could not update a folder: " + folder.getPath(), e);
-        } catch (NodeException e) {
-            throw new CommonException("could.not.update.folder",
-                    "Could not update a folder: " + folder.getPath(), e);
         }
     }
 
@@ -2122,12 +1969,9 @@
         try {
             getPageManager().updatePage(page);
             getPageManager().reset();
-        } catch (PageNotUpdatedException e) {
+        } catch (Exception e) {
             throw new CommonException("could.not.update.page",
                     "Could not update a page: " + page.getPath(), e);
-        } catch (NodeException e) {
-            throw new CommonException("could.not.update.page",
-                    "Could not update a page: " + page.getPath(), e);
         }
     }
 
@@ -2144,12 +1988,9 @@
         try {
             getPageManager().updateFolder(folder);
             getPageManager().reset();
-        } catch (FolderNotUpdatedException e) {
+        } catch (Exception e) {
             throw new CommonException("could.not.update.folder",
                     "Could not update a folder: " + folder.getPath(), e);
-        } catch (NodeException e) {
-            throw new CommonException("could.not.update.folder",
-                    "Could not update a folder: " + folder.getPath(), e);
         }
     }
 
@@ -2192,12 +2033,9 @@
         try {
             getPageManager().updatePage(page);
             getPageManager().reset();
-        } catch (PageNotUpdatedException e) {
+        } catch (Exception e) {
             throw new CommonException("could.not.update.page",
                     "Could not update a page: " + page.getPath(), e);
-        } catch (NodeException e) {
-            throw new CommonException("could.not.update.page",
-                    "Could not update a page: " + page.getPath(), e);
         }
     }
 
@@ -2214,12 +2052,9 @@
         try {
             getPageManager().updateFolder(folder);
             getPageManager().reset();
-        } catch (FolderNotUpdatedException e) {
+        } catch (Exception e) {
             throw new CommonException("could.not.update.folder",
                     "Could not update a folder: " + folder.getPath(), e);
-        } catch (NodeException e) {
-            throw new CommonException("could.not.update.folder",
-                    "Could not update a folder: " + folder.getPath(), e);
         }
     }
 
@@ -2261,12 +2096,9 @@
         try {
             getPageManager().updatePage(page);
             getPageManager().reset();
-        } catch (PageNotUpdatedException e) {
+        } catch (Exception e) {
             throw new CommonException("could.not.update.page",
                     "Could not update a page: " + page.getPath(), e);
-        } catch (NodeException e) {
-            throw new CommonException("could.not.update.page",
-                    "Could not update a page: " + page.getPath(), e);
         }
     }
 
@@ -2282,12 +2114,9 @@
         try {
             getPageManager().updateFolder(folder);
             getPageManager().reset();
-        } catch (FolderNotUpdatedException e) {
+        } catch (Exception e) {
             throw new CommonException("could.not.update.folder",
                     "Could not update a folder: " + folder.getPath(), e);
-        } catch (NodeException e) {
-            throw new CommonException("could.not.update.folder",
-                    "Could not update a folder: " + folder.getPath(), e);
         }
     }
 
@@ -2354,12 +2183,9 @@
         try {
             getPageManager().updatePage(page);
             getPageManager().reset();
-        } catch (PageNotUpdatedException e) {
+        } catch (Exception e) {
             throw new CommonException("could.not.update.layout",
                     "Could not update a layout: " + path, e);
-        } catch (NodeException e) {
-            throw new CommonException("could.not.update.layout",
-                    "Could not update a layout: " + path, e);
         }
     }
 
@@ -2388,12 +2214,9 @@
         try {
             getPageManager().updatePage(page);
             getPageManager().reset();
-        } catch (PageNotUpdatedException e) {
+        } catch (Exception e) {
             throw new CommonException("could.not.update.layout",
                     "Could not update a layout: " + path, e);
-        } catch (NodeException e) {
-            throw new CommonException("could.not.update.layout",
-                    "Could not update a layout: " + path, e);
         }
     }
 
@@ -2422,12 +2245,9 @@
         try {
             getPageManager().updatePage(page);
             getPageManager().reset();
-        } catch (PageNotUpdatedException e) {
+        } catch (Exception e) {
             throw new CommonException("could.not.update.portlet",
                     "Could not update a portlet: " + path, e);
-        } catch (NodeException e) {
-            throw new CommonException("could.not.update.portlet",
-                    "Could not update a portlet: " + path, e);
         }
     }
 
@@ -2456,12 +2276,9 @@
         try {
             getPageManager().updatePage(page);
             getPageManager().reset();
-        } catch (PageNotUpdatedException e) {
+        } catch (Exception e) {
             throw new CommonException("could.not.update.portlet",
                     "Could not update a portlet: " + path, e);
-        } catch (NodeException e) {
-            throw new CommonException("could.not.update.portlet",
-                    "Could not update a portlet: " + path, e);
         }
     }
 
@@ -2502,12 +2319,9 @@
         try {
             getPageManager().updatePage(page);
             getPageManager().reset();
-        } catch (PageNotUpdatedException e) {
+        } catch (Exception e) {
             throw new CommonException("could.not.update.layout",
                     "Could not update a layout: " + path, e);
-        } catch (NodeException e) {
-            throw new CommonException("could.not.update.layout",
-                    "Could not update a layout: " + path, e);
         }
     }
 
@@ -2543,12 +2357,9 @@
         try {
             getPageManager().updatePage(page);
             getPageManager().reset();
-        } catch (PageNotUpdatedException e) {
+        } catch (Exception e) {
             throw new CommonException("could.not.update.layout",
                     "Could not update a layout: " + path, e);
-        } catch (NodeException e) {
-            throw new CommonException("could.not.update.layout",
-                    "Could not update a layout: " + path, e);
         }
     }
 
@@ -2589,12 +2400,9 @@
         try {
             getPageManager().updatePage(page);
             getPageManager().reset();
-        } catch (PageNotUpdatedException e) {
+        } catch (Exception e) {
             throw new CommonException("could.not.update.portlet",
                     "Could not update a portlet: " + path, e);
-        } catch (NodeException e) {
-            throw new CommonException("could.not.update.portlet",
-                    "Could not update a portlet: " + path, e);
         }
     }
 
@@ -2630,12 +2438,9 @@
         try {
             getPageManager().updatePage(page);
             getPageManager().reset();
-        } catch (PageNotUpdatedException e) {
+        } catch (Exception e) {
             throw new CommonException("could.not.update.portlet",
                     "Could not update a portlet: " + path, e);
-        } catch (NodeException e) {
-            throw new CommonException("could.not.update.portlet",
-                    "Could not update a portlet: " + path, e);
         }
     }
 


pal-cvs メーリングリストの案内
Back to archive index