avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blorit...@apache.org
Subject cvs commit: jakarta-avalon/src/java/org/apache/avalon/framework/service ServiceException.java
Date Tue, 18 Jun 2002 18:44:24 GMT
bloritsch    2002/06/18 11:44:24

  Modified:    src/java/org/apache/avalon/framework/service
                        ServiceException.java
  Log:
  fix ServiceException to allow for role name
  
  Revision  Changes    Path
  1.3       +35 -1     jakarta-avalon/src/java/org/apache/avalon/framework/service/ServiceException.java
  
  Index: ServiceException.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon/src/java/org/apache/avalon/framework/service/ServiceException.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ServiceException.java	14 Jun 2002 01:55:52 -0000	1.2
  +++ ServiceException.java	18 Jun 2002 18:44:23 -0000	1.3
  @@ -22,24 +22,58 @@
   public class ServiceException
       extends CascadingException
   {
  +    final private String m_role;
  +
       /**
        * Construct a new <code>ComponentException</code> instance.
        *
  +     * @deprecated use the String,String,Throwable version instead
        * @param message the exception message
        * @param throwable the throwable
        */
       public ServiceException( final String message, final Throwable throwable )
       {
  +        this( null, message, throwable );
  +    }
  +
  +    /**
  +     * Construct a new <code>ComponentException</code> instance.
  +     *
  +     * @param message the exception message
  +     * @param throwable the throwable
  +     */
  +    public ServiceException( final String role, final String message, final Throwable throwable
)
  +    {
           super( message, throwable );
  +        m_role = role;
       }
   
       /**
        * Construct a new <code>ComponentException</code> instance.
        *
  +     * @deprecated use the String,String version instead
        * @param message the exception message
        */
       public ServiceException( final String message )
       {
  -        super( message, null );
  +        this( null, message, null );
  +    }
  +
  +    /**
  +     * Construct a new <code>ComponentException</code> instance.
  +     *
  +     * @param message the exception message
  +     */
  +    public ServiceException( final String role, final String message )
  +    {
  +        this( role, message, null );
  +    }
  +    
  +    /**
  +     * Return the role that caused the exception
  +     */
  +    public String getRole()
  +    {
  +        return m_role;
       }
   }
  
  
  

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


Mime
View raw message