cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject svn commit: r291774 - /cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/util/location/LocatedException.java
Date Mon, 26 Sep 2005 22:47:41 GMT
Author: vgritsenko
Date: Mon Sep 26 15:47:38 2005
New Revision: 291774

URL: http://svn.apache.org/viewcvs?rev=291774&view=rev
Log:
whitespace

Modified:
    cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/util/location/LocatedException.java

Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/util/location/LocatedException.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/util/location/LocatedException.java?rev=291774&r1=291773&r2=291774&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/util/location/LocatedException.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/util/location/LocatedException.java
Mon Sep 26 15:47:38 2005
@@ -1,12 +1,12 @@
 /*
  * Copyright 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.
@@ -23,37 +23,37 @@
 import org.apache.commons.lang.exception.ExceptionUtils;
 import org.apache.commons.lang.exception.NestableException;
 
-
 /**
  * A cascading and located <code>Exception</code>. It is also {@link MultiLocatable}
to easily build
  * stack traces.
- * 
+ *
  * @since 2.1.8
  * @version $Id$
  */
-public class LocatedException extends NestableException implements LocatableException, MultiLocatable
{
+public class LocatedException extends NestableException
+                              implements LocatableException, MultiLocatable {
 
     private List locations;
 
     public LocatedException(String message) {
         this(message, null, null);
     }
-    
+
     public LocatedException(String message, Throwable cause) {
         this(message, cause, null);
     }
-    
+
     public LocatedException(String message, Location location) {
         this(message, null, location);
     }
-    
+
     public LocatedException(String message, Throwable cause, Location location) {
         super(message, cause);
         ensureCauseChainIsSet(cause);
         addCauseLocations(this, cause);
         addLocation(location);
     }
-    
+
     private static Method INIT_CAUSE_METHOD = null;
     static {
         try {
@@ -62,7 +62,7 @@
             // JDK < 1.4: ignore
         }
     }
-    
+
     /**
      * Crawl the cause chain and ensure causes are properly set using "initCause" on JDK
>= 1.4.
      * This is needed because some exceptions (e.g. SAXException) don't have a getCause()
that is
@@ -71,21 +71,21 @@
     public static void ensureCauseChainIsSet(Throwable thr) {
         if (INIT_CAUSE_METHOD == null)
             return;
-        
+
         // Loop either until null or encountering exceptions that use this method.
-        while(thr != null && !(thr instanceof LocatedRuntimeException) &&
!(thr instanceof LocatedException)) {
+        while (thr != null && !(thr instanceof LocatedRuntimeException) &&
!(thr instanceof LocatedException)) {
             Throwable parent = ExceptionUtils.getCause(thr);
             if (parent != null) {
                 try {
                     INIT_CAUSE_METHOD.invoke(thr, new Object[]{ parent });
-                } catch(Exception e) {
+                } catch (Exception e) {
                     // can happen if parent already set on exception
                 }
             }
             thr = parent;
         }
     }
-    
+
     /**
      * Add to the location stack all locations of an exception chain. This allows to have
all possible
      * location information in the stacktrace, as some exceptions like SAXParseException
don't output
@@ -96,7 +96,7 @@
      * <p>
      * This method is static as a convenience for {@link LocatedRuntimeException other implementations}
      * of locatable exceptions.
-     * 
+     *
      * @param self the current locatable exception
      * @param cause a cause of <code>self</code>
      */
@@ -136,10 +136,10 @@
     /**
      * Standard way of building the message of a {@link LocatableException}, as a Java-like
      * stack trace of locations.
-     * 
+     *
      * @param message the exception's message, given by <code>super.getMessage()</code>
(can be null)
      * @param locations the location list (can be null)
-     * 
+     *
      * @return the message, or <code>null</code> no message and locations were
given.
      */
     public static String getMessage(String message, List locations) {
@@ -158,7 +158,7 @@
     public String getMessage() {
         return getMessage(super.getMessage(), locations);
     }
-    
+
     public void addLocation(Location loc) {
         if (LocationUtils.isUnknown(loc))
             return;



Mime
View raw message