donaldp     01/04/24 22:23:49

  Modified:    src/java/org/apache/avalon/atlantis SystemManager.java
  Added:       src/java/org/apache/avalon/atlantis ManagerException.java
  Log:
  Change to use ManagerException rather than raw exception.
  
  Revision  Changes    Path
  1.4       +10 -7     
jakarta-avalon-phoenix/src/java/org/apache/avalon/atlantis/SystemManager.java
  
  Index: SystemManager.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-phoenix/src/java/org/apache/avalon/atlantis/SystemManager.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SystemManager.java        2001/04/25 03:17:04     1.3
  +++ SystemManager.java        2001/04/25 05:23:49     1.4
  @@ -32,31 +32,34 @@
        * @param name the name to register object under
        * @param object the object
        * @param interfaces the interfaces to register the component under
  -     * @exception Exception if an error occurs. An error could occur if the object 
doesn't 
  +     * @exception ManagerException if an error occurs. An error could occur if the 
object doesn't 
        *            implement the interfaces, the interfaces parameter contain 
non-instance 
        *            classes, the name is already registered etc.
  +     * @exception IllegalArgumentException if object or interfaces is null
        */
       void register( String name, Object object, Class[] interfaces )
  -        throws Exception;
  +        throws ManagerException, IllegalArgumentException;
   
       /**
        * Register an object for management.
        * The object is exported through some management scheme
  -     * (typically JMX).
  +     * (typically JMX). Note that the particular management scheme
  +     * will most likely use reflection to extract manageable information.
        *
        * @param name the name to register object under
        * @param object the object
  -     * @exception Exception if an error occurs such as name being already 
registered.
  +     * @exception ManagerException if an error occurs such as name already 
registered.
  +     * @exception IllegalArgumentException if object is null
        */
       void register( String name, Object object )
  -        throws Exception;
  +        throws ManagerException, IllegalArgumentException;
   
       /**
        * Unregister named object.
        *
        * @param name the name of object to unregister
  -     * @exception Exception if an error occurs such as when no such object 
registered.
  +     * @exception ManagerException if an error occurs such as when no such object 
registered.
        */
       void unregister( String name )
  -        throws Exception;
  +        throws ManagerException;
   }
  
  
  
  1.1                  
jakarta-avalon-phoenix/src/java/org/apache/avalon/atlantis/ManagerException.java
  
  Index: ManagerException.java
  ===================================================================
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included with this distribution in
   * the LICENSE file.
   */
  package org.apache.avalon.atlantis;
  
  import org.apache.avalon.CascadingException;
  
  /**
   * The ManagerException used to indicate problems with managers.
   *
   * @author <a href="mailto:[EMAIL PROTECTED]";>Peter Donald</a>
   */
  public class ManagerException
      extends CascadingException
  {
      public ManagerException( final String message )
      {
          this( message, null );
      }
  
      public ManagerException( final String message, final Throwable throwable )
      {
          super( message, throwable );
      }
  }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to