You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by re...@apache.org on 2001/07/24 03:10:10 UTC

cvs commit: jakarta-slide/src/share/org/apache/slide/macro MacroException.java

remm        01/07/23 18:10:10

  Modified:    src/share/org/apache/slide/macro MacroException.java
  Log:
  - Move the nested exception code to common.
  
  Revision  Changes    Path
  1.3       +7 -70     jakarta-slide/src/share/org/apache/slide/macro/MacroException.java
  
  Index: MacroException.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/src/share/org/apache/slide/macro/MacroException.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MacroException.java	2000/09/26 02:44:18	1.2
  +++ MacroException.java	2001/07/24 01:10:10	1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/macro/MacroException.java,v 1.2 2000/09/26 02:44:18 remm Exp $
  - * $Revision: 1.2 $
  - * $Date: 2000/09/26 02:44:18 $
  + * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/macro/MacroException.java,v 1.3 2001/07/24 01:10:10 remm Exp $
  + * $Revision: 1.3 $
  + * $Date: 2001/07/24 01:10:10 $
    *
    * ====================================================================
    *
  @@ -65,15 +65,16 @@
   
   import java.util.Vector;
   import java.util.Enumeration;
  +import org.apache.slide.common.NestedSlideException;
   import org.apache.slide.common.SlideException;
   
   /**
    * Macro exception.
    * 
    * @author <a href="mailto:remm@apache.org">Remy Maucherat</a>
  - * @version $Revision: 1.2 $
  + * @version $Revision: 1.3 $
    */
  -public class MacroException extends SlideException {
  +public class MacroException extends NestedSlideException {
       
       
       // ----------------------------------------------------------- Constructors
  @@ -83,72 +84,8 @@
        * 
        */
       public MacroException(String message) {
  -        super(message, false);
  -        exceptions = new Vector();
  +        super(message);
       }
       
  -    
  -    // ----------------------------------------------------- Instance Variables
  -    
  -    
  -    /**
  -     * Vector of exceptions which have been put in this exception.
  -     */
  -    private Vector exceptions;
  -    
  -    
  -    // ------------------------------------------------------------- Properties
  -    
  -    
  -    /**
  -     * Add a new nested exception.
  -     * 
  -     * @param exception Exception to be added
  -     */
  -    void addException(SlideException exception) {
  -        exceptions.addElement(exception);
  -    }
  -    
  -    
  -    /**
  -     * Enumerate nested exceptions.
  -     * 
  -     * @return Enumeration nested exceptions list
  -     */
  -    public Enumeration enumerateExceptions() {
  -        return exceptions.elements();
  -    }
  -    
  -    
  -    // -------------------------------------------------------- Package Methods
  -    
  -    
  -    /**
  -     * Returns true if no exceptions have been put in this exception.
  -     * 
  -     * @return boolean
  -     */
  -    boolean isEmpty() {
  -        return exceptions.isEmpty();
  -    }
  -    
  -    
  -    // --------------------------------------------------------- Object Methods
  -    
  -    
  -    /**
  -     * Displays the exception message.
  -     * 
  -     * @return String exception message
  -     */
  -    public String toString() {
  -        String result = new String();
  -        Enumeration list = exceptions.elements();
  -        while (list.hasMoreElements()) {
  -            SlideException e = (SlideException) list.nextElement();
  -            result = result + e.getMessage() + "\n";
  -        }
  -        return result;
  -    }
       
   }