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 19:44:19 UTC

svn commit: r292491 - in /cocoon/trunk/src/java/org/apache/cocoon/components/flow/javascript/fom: FOMResourceNotFoundException.java FOM_Cocoon.java

Author: bloritsch
Date: Thu Sep 29 10:44:16 2005
New Revision: 292491

URL: http://svn.apache.org/viewcvs?rev=292491&view=rev
Log:
Add the FOM exceptions

Added:
    cocoon/trunk/src/java/org/apache/cocoon/components/flow/javascript/fom/FOMResourceNotFoundException.java
Modified:
    cocoon/trunk/src/java/org/apache/cocoon/components/flow/javascript/fom/FOM_Cocoon.java

Added: cocoon/trunk/src/java/org/apache/cocoon/components/flow/javascript/fom/FOMResourceNotFoundException.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/components/flow/javascript/fom/FOMResourceNotFoundException.java?rev=292491&view=auto
==============================================================================
--- cocoon/trunk/src/java/org/apache/cocoon/components/flow/javascript/fom/FOMResourceNotFoundException.java (added)
+++ cocoon/trunk/src/java/org/apache/cocoon/components/flow/javascript/fom/FOMResourceNotFoundException.java Thu Sep 29 10:44:16 2005
@@ -0,0 +1,35 @@
+/*
+ * 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.components.flow.javascript.fom;
+
+import org.apache.avalon.framework.CascadingRuntimeException;
+
+/**
+ * The exception thrown when the FOM classes can't find the necessary
+ * resource.
+ */
+public final class FOMResourceNotFoundException extends CascadingRuntimeException
+{
+    public FOMResourceNotFoundException(String message)
+    {
+        super(message, null);
+    }
+
+    public FOMResourceNotFoundException(String message, Throwable cause)
+    {
+        super(message, cause);
+    }
+}

Modified: cocoon/trunk/src/java/org/apache/cocoon/components/flow/javascript/fom/FOM_Cocoon.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/components/flow/javascript/fom/FOM_Cocoon.java?rev=292491&r1=292490&r2=292491&view=diff
==============================================================================
--- cocoon/trunk/src/java/org/apache/cocoon/components/flow/javascript/fom/FOM_Cocoon.java (original)
+++ cocoon/trunk/src/java/org/apache/cocoon/components/flow/javascript/fom/FOM_Cocoon.java Thu Sep 29 10:44:16 2005
@@ -29,7 +29,6 @@
 import java.util.Map;
 import java.util.Set;
 
-import org.apache.avalon.framework.CascadingRuntimeException;
 import org.apache.avalon.framework.context.Context;
 import org.apache.avalon.framework.context.ContextException;
 import org.apache.avalon.framework.logger.Logger;
@@ -224,7 +223,7 @@
         try {
             sitemapManager = (ServiceManager)avalonContext.get(ContextHelper.CONTEXT_SITEMAP_SERVICE_MANAGER);
         } catch (ContextException e) {
-            throw new CascadingRuntimeException("Cannot get sitemap service manager", e);
+            throw new FOMResourceNotFoundException("Cannot get sitemap service manager", e);
         }
 
         this.currentCall = new CallContext(currentCall, interp, redirector, sitemapManager,