cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blorit...@apache.org
Subject svn commit: r292508 - in /cocoon/trunk/src/java/org/apache/cocoon/core/osgi: CoreOSGIServiceException.java OSGiCoreServiceManager.java
Date Thu, 29 Sep 2005 18:56:02 GMT
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);
             }
         }
     }



Mime
View raw message