Coverage Report - org.mule.util.ExceptionHolder
 
Classes in this File Line Coverage Branch Coverage Complexity
ExceptionHolder
0%
0/13
0%
0/4
1.2
 
 1  
 /*
 2  
  * $Id: ExceptionHolder.java 10489 2008-01-23 17:53:38Z dfeist $
 3  
  * --------------------------------------------------------------------------------------
 4  
  * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.com
 5  
  *
 6  
  * The software in this package is published under the terms of the CPAL v1.0
 7  
  * license, a copy of which has been included with this distribution in the
 8  
  * LICENSE.txt file.
 9  
  */
 10  
 package org.mule.util;
 11  
 
 12  
 import java.beans.ExceptionListener;
 13  
 import java.util.ArrayList;
 14  
 import java.util.Iterator;
 15  
 import java.util.List;
 16  
 
 17  
 /** TODO */
 18  0
 public class ExceptionHolder implements ExceptionListener
 19  
 {
 20  0
     private List exceptions = new ArrayList(2);
 21  
 
 22  
     public void exceptionThrown(Exception e)
 23  
     {
 24  0
         exceptions.add(e);
 25  0
     }
 26  
 
 27  
     public List getExceptions()
 28  
     {
 29  0
         return exceptions;
 30  
     }
 31  
 
 32  
     public boolean isExceptionThrown()
 33  
     {
 34  0
         return exceptions.size() > 0;
 35  
     }
 36  
 
 37  
     public void clear()
 38  
     {
 39  0
         exceptions.clear();
 40  0
     }
 41  
 
 42  
     public void print()
 43  
     {
 44  0
         for (Iterator iterator = exceptions.iterator(); iterator.hasNext();)
 45  
         {
 46  0
             Exception exception = (Exception) iterator.next();
 47  0
             exception.printStackTrace();
 48  0
         }
 49  0
     }
 50  
 }