You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by bl...@apache.org on 2005/09/29 20:56:02 UTC

svn commit: r292508 - in /cocoon/trunk/src/java/org/apache/cocoon/core/osgi: CoreOSGIServiceException.java OSGiCoreServiceManager.java

Author: bloritsch
Date: Thu Sep 29 11:55:59 2005
New Revision: 292508

URL: http://svn.apache.org/viewcvs?rev=292508&view=rev
Log:
add new OSGI related exception

Added:
    cocoon/trunk/src/java/org/apache/cocoon/core/osgi/CoreOSGIServiceException.java
Modified:
    cocoon/trunk/src/java/org/apache/cocoon/core/osgi/OSGiCoreServiceManager.java

Added: cocoon/trunk/src/java/org/apache/cocoon/core/osgi/CoreOSGIServiceException.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/core/osgi/CoreOSGIServiceException.java?rev=292508&view=auto
==============================================================================
--- cocoon/trunk/src/java/org/apache/cocoon/core/osgi/CoreOSGIServiceException.java (added)
+++ cocoon/trunk/src/java/org/apache/cocoon/core/osgi/CoreOSGIServiceException.java Thu Sep 29 11:55:59 2005
@@ -0,0 +1,31 @@
+/*
+ * Copyright 1999-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cocoon.core.osgi;
+
+import org.apache.cocoon.core.CoreException;
+
+public final class CoreOSGIServiceException extends CoreException
+{
+    public CoreOSGIServiceException(String message)
+    {
+        super(message, null);
+    }
+
+    public CoreOSGIServiceException(String message, Throwable cause)
+    {
+        super(message, cause);
+    }
+}

Modified: cocoon/trunk/src/java/org/apache/cocoon/core/osgi/OSGiCoreServiceManager.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/core/osgi/OSGiCoreServiceManager.java?rev=292508&r1=292507&r2=292508&view=diff
==============================================================================
--- cocoon/trunk/src/java/org/apache/cocoon/core/osgi/OSGiCoreServiceManager.java (original)
+++ cocoon/trunk/src/java/org/apache/cocoon/core/osgi/OSGiCoreServiceManager.java Thu Sep 29 11:55:59 2005
@@ -95,7 +95,7 @@
             try {
                 return handler.get();
             } catch (Exception e) {
-                throw new RuntimeException("Cannot get service", e);
+                throw new CoreOSGIServiceException("Cannot get service", e);
             }
         }
 
@@ -103,7 +103,7 @@
             try {
                 handler.put(obj);
             } catch (Exception e) {
-                throw new RuntimeException("Cannot unget service", e);
+                throw new CoreOSGIServiceException("Cannot unget service", e);
             }
         }
     }