You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by mc...@apache.org on 2003/10/25 05:32:07 UTC

cvs commit: avalon/merlin/kernel/loader/src/java/org/apache/avalon/merlin/env EnvAccessException.java

mcconnell    2003/10/24 20:32:07

  Modified:    merlin/kernel/loader/src/java/org/apache/avalon/merlin/env
                        EnvAccessException.java
  Log:
  Update to move from JDK 1.4 to 1.2 dependence.
  
  Revision  Changes    Path
  1.2       +15 -4     avalon/merlin/kernel/loader/src/java/org/apache/avalon/merlin/env/EnvAccessException.java
  
  Index: EnvAccessException.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/kernel/loader/src/java/org/apache/avalon/merlin/env/EnvAccessException.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- EnvAccessException.java	25 Oct 2003 03:08:57 -0000	1.1
  +++ EnvAccessException.java	25 Oct 2003 03:32:07 -0000	1.2
  @@ -55,7 +55,7 @@
    * environment parameters.
    * 
    * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
  - * @author $Author$
  + * @author <a href="mailto:mcconnell@apache.org">Stephen McConnell</a>
    * @version $Revision$
    */
   public class EnvAccessException extends Exception
  @@ -63,6 +63,7 @@
       /** the environment variable name if available */
       public final String m_variable ;
       
  +    public final Throwable m_cause;
       
       /**
        * Creates an exception denoting a failure while attempting to access an 
  @@ -75,9 +76,10 @@
        */
       EnvAccessException( final String a_variable, final Throwable a_cause )
       {
  -        super( a_cause ) ;
  +        super() ;
           
           m_variable = a_variable ;
  +        m_cause = a_cause;
       }
   
   
  @@ -88,13 +90,13 @@
        * 
        * @param a_variable the variable whose value was to be accessed
        * @param a_message the reason for the access failure 
  -     * @param a_cause the underlying exception that caused the failure
        */
       EnvAccessException( final String a_variable, final String a_message )
       {
           super( a_message ) ;
           
           m_variable = a_variable ;
  +        m_cause = null;
       }
   
   
  @@ -108,6 +110,15 @@
           return m_variable ;
       }
   
  +    /**
  +     * Return the causal exception.
  +     * 
  +     * @return the exception that caused this exception (possibly null)
  +     */
  +    public Throwable getCause()
  +    {
  +        return m_cause;
  +    }
   
       /**
        * Prepends variable name to the base message.
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org