tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu...@apache.org
Subject cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core StandardContext.java StandardDefaultContext.java
Date Tue, 13 Apr 2004 23:59:51 GMT
luehe       2004/04/13 16:59:50

  Modified:    catalina/src/share/org/apache/catalina/core
                        StandardContext.java StandardDefaultContext.java
  Log:
  Added support for exception chaining.
  
  Let me know if the call to Throwable.initCause(), which was added in J2SE 1.4, is a problem,
and I'll comment it out.
  
  Revision  Changes    Path
  1.126     +10 -4     jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java
  
  Index: StandardContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
  retrieving revision 1.125
  retrieving revision 1.126
  diff -u -r1.125 -r1.126
  --- StandardContext.java	7 Apr 2004 21:34:12 -0000	1.125
  +++ StandardContext.java	13 Apr 2004 23:59:50 -0000	1.126
  @@ -5064,8 +5064,10 @@
                       MBeanUtils.createObjectName(this.getEngineName(), envs[i]);
                   results.add(oname.toString());
               } catch (MalformedObjectNameException e) {
  -                throw new IllegalArgumentException
  +                IllegalArgumentException iae = new IllegalArgumentException
                       ("Cannot create object name for environment " + envs[i]);
  +                iae.initCause(e);
  +                throw iae;
               }
           }
           return ((String[]) results.toArray(new String[results.size()]));
  @@ -5087,8 +5089,10 @@
                       MBeanUtils.createObjectName(this.getEngineName(), resources[i]);
                   results.add(oname.toString());
               } catch (MalformedObjectNameException e) {
  -                throw new IllegalArgumentException
  +                IllegalArgumentException iae = new IllegalArgumentException
                       ("Cannot create object name for resource " + resources[i]);
  +                iae.initCause(e);
  +                throw iae;
               }
           }
           return ((String[]) results.toArray(new String[results.size()]));
  @@ -5110,8 +5114,10 @@
                       MBeanUtils.createObjectName(this.getEngineName(), links[i]);
                   results.add(oname.toString());
               } catch (MalformedObjectNameException e) {
  -                throw new IllegalArgumentException
  +                IllegalArgumentException iae = new IllegalArgumentException
                       ("Cannot create object name for resource " + links[i]);
  +                iae.initCause(e);
  +                throw iae;
               }
           }
           return ((String[]) results.toArray(new String[results.size()]));
  
  
  
  1.13      +14 -7     jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardDefaultContext.java
  
  Index: StandardDefaultContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardDefaultContext.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- StandardDefaultContext.java	27 Feb 2004 14:58:42 -0000	1.12
  +++ StandardDefaultContext.java	13 Apr 2004 23:59:50 -0000	1.13
  @@ -1532,9 +1532,10 @@
                   }
                   context.setLoader(context_loader);
               } catch(Exception e) {
  -                throw new IllegalArgumentException
  -                   ("DefaultContext custom Loader install failed, Exception: " +
  -                   e.getMessage());
  +                IllegalArgumentException iae = new IllegalArgumentException
  +                   ("DefaultContext custom Loader install failed");
  +                iae.initCause(e);
  +                throw iae;
               }
           }
       }
  @@ -1695,8 +1696,10 @@
                       MBeanUtils.createObjectName(this.getDomain(), envs[i]);
                   results.add(oname.toString());
               } catch (MalformedObjectNameException e) {
  -                throw new IllegalArgumentException
  +                IllegalArgumentException iae = new IllegalArgumentException
                       ("Cannot create object name for environment " + envs[i]);
  +                iae.initCause(e);
  +                throw iae;
               }
           }
           return ((String[]) results.toArray(new String[results.size()]));
  @@ -1719,8 +1722,10 @@
                       MBeanUtils.createObjectName(getDomain(), resources[i]);
                   results.add(oname.toString());
               } catch (MalformedObjectNameException e) {
  -                throw new IllegalArgumentException
  +                IllegalArgumentException iae = new IllegalArgumentException
                       ("Cannot create object name for resource " + resources[i]);
  +                iae.initCause(e);
  +                throw iae;
               }
           }
           return ((String[]) results.toArray(new String[results.size()]));
  @@ -1742,8 +1747,10 @@
                       MBeanUtils.createObjectName(getDomain(), links[i]);
                   results.add(oname.toString());
               } catch (MalformedObjectNameException e) {
  -                throw new IllegalArgumentException
  +                IllegalArgumentException iae = new IllegalArgumentException
                       ("Cannot create object name for resource " + links[i]);
  +                iae.initCause(e);
  +                throw iae;
               }
           }
           return ((String[]) results.toArray(new String[results.size()]));
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message