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/30 16:31:03 UTC

svn commit: r292749 - in /cocoon/trunk/src/java/org/apache/cocoon/environment/internal: EnvironmentHelperException.java PopEnvironmentChanger.java PushEnvironmentChanger.java UnableToPopEnvironmentException.java UnableToPushEnvironmentException.java

Author: bloritsch
Date: Fri Sep 30 07:30:58 2005
New Revision: 292749

URL: http://svn.apache.org/viewcvs?rev=292749&view=rev
Log:
oops.  Fix package and names

Added:
    cocoon/trunk/src/java/org/apache/cocoon/environment/internal/EnvironmentHelperException.java
    cocoon/trunk/src/java/org/apache/cocoon/environment/internal/UnableToPopEnvironmentException.java
    cocoon/trunk/src/java/org/apache/cocoon/environment/internal/UnableToPushEnvironmentException.java
Modified:
    cocoon/trunk/src/java/org/apache/cocoon/environment/internal/PopEnvironmentChanger.java
    cocoon/trunk/src/java/org/apache/cocoon/environment/internal/PushEnvironmentChanger.java

Added: cocoon/trunk/src/java/org/apache/cocoon/environment/internal/EnvironmentHelperException.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/environment/internal/EnvironmentHelperException.java?rev=292749&view=auto
==============================================================================
--- cocoon/trunk/src/java/org/apache/cocoon/environment/internal/EnvironmentHelperException.java (added)
+++ cocoon/trunk/src/java/org/apache/cocoon/environment/internal/EnvironmentHelperException.java Fri Sep 30 07:30:58 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.environment.internal;
+
+import org.apache.avalon.framework.CascadingRuntimeException;
+
+public class EnvironmentHelperException extends CascadingRuntimeException
+{
+    public EnvironmentHelperException(String message)
+    {
+        super(message, null);
+    }
+
+    public EnvironmentHelperException(String message, Throwable cause)
+    {
+        super(message, cause);
+    }
+}

Modified: cocoon/trunk/src/java/org/apache/cocoon/environment/internal/PopEnvironmentChanger.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/environment/internal/PopEnvironmentChanger.java?rev=292749&r1=292748&r2=292749&view=diff
==============================================================================
--- cocoon/trunk/src/java/org/apache/cocoon/environment/internal/PopEnvironmentChanger.java (original)
+++ cocoon/trunk/src/java/org/apache/cocoon/environment/internal/PopEnvironmentChanger.java Fri Sep 30 07:30:58 2005
@@ -57,7 +57,7 @@
         try {
             EnvironmentHelper.enterEnvironment(environment);
         } catch (ProcessingException e) {
-            throw new SAXException("PopEnvironmentChanger: ", e);
+            throw new SAXException("Unable to enter the environment: " + environment, e);
         }
     }
 
@@ -67,7 +67,7 @@
         try {
             enterEnvironment(environment);
         } catch (SAXException e) {
-            throw new RuntimeException("PopEnvironmentChanger: ", e);
+            throw new UnableToPopEnvironmentException("Unable to re-enter the environment: " + environment, e);
         }
     }
 

Modified: cocoon/trunk/src/java/org/apache/cocoon/environment/internal/PushEnvironmentChanger.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/environment/internal/PushEnvironmentChanger.java?rev=292749&r1=292748&r2=292749&view=diff
==============================================================================
--- cocoon/trunk/src/java/org/apache/cocoon/environment/internal/PushEnvironmentChanger.java (original)
+++ cocoon/trunk/src/java/org/apache/cocoon/environment/internal/PushEnvironmentChanger.java Fri Sep 30 07:30:58 2005
@@ -67,7 +67,7 @@
         try {
             enterEnvironment();
         } catch (SAXException e) {
-            throw new RuntimeException("PushEnvironmentChanger", e);
+            throw new UnableToPushEnvironmentException("Unable to push the environment", e);
         }
         this.consumer.setDocumentLocator(locator);
         leaveEnvironment();

Added: cocoon/trunk/src/java/org/apache/cocoon/environment/internal/UnableToPopEnvironmentException.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/environment/internal/UnableToPopEnvironmentException.java?rev=292749&view=auto
==============================================================================
--- cocoon/trunk/src/java/org/apache/cocoon/environment/internal/UnableToPopEnvironmentException.java (added)
+++ cocoon/trunk/src/java/org/apache/cocoon/environment/internal/UnableToPopEnvironmentException.java Fri Sep 30 07:30:58 2005
@@ -0,0 +1,29 @@
+/*
+ * 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.environment.internal;
+
+public final class UnableToPopEnvironmentException extends EnvironmentHelperException
+{
+    public UnableToPopEnvironmentException(String message)
+    {
+        super(message, null);
+    }
+
+    public UnableToPopEnvironmentException(String message, Throwable cause)
+    {
+        super(message, cause);
+    }
+}

Added: cocoon/trunk/src/java/org/apache/cocoon/environment/internal/UnableToPushEnvironmentException.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/environment/internal/UnableToPushEnvironmentException.java?rev=292749&view=auto
==============================================================================
--- cocoon/trunk/src/java/org/apache/cocoon/environment/internal/UnableToPushEnvironmentException.java (added)
+++ cocoon/trunk/src/java/org/apache/cocoon/environment/internal/UnableToPushEnvironmentException.java Fri Sep 30 07:30:58 2005
@@ -0,0 +1,29 @@
+/*
+ * 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.environment.internal;
+
+public final class UnableToPushEnvironmentException extends EnvironmentHelperException
+{
+    public UnableToPushEnvironmentException(String message)
+    {
+        super(message, null);
+    }
+
+    public UnableToPushEnvironmentException(String message, Throwable cause)
+    {
+        super(message, cause);
+    }
+}