Coverage Report - org.mule.tck.TestingWorkListener
 
Classes in this File Line Coverage Branch Coverage Complexity
TestingWorkListener
0%
0/10
0%
0/4
7
 
 1  
 /*
 2  
  * $Id$
 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  
 
 11  
 package org.mule.tck;
 12  
 
 13  
 import org.mule.umo.manager.DefaultWorkListener;
 14  
 
 15  
 import javax.resource.spi.work.WorkEvent;
 16  
 
 17  0
 public class TestingWorkListener extends DefaultWorkListener
 18  
 {
 19  
     protected void handleWorkException(WorkEvent event, String type)
 20  
     {
 21  0
         super.handleWorkException(event, type);
 22  0
         if (event.getException() != null)
 23  
         {
 24  0
             Throwable t = event.getException().getCause();
 25  0
             if (t != null)
 26  
             {
 27  
 
 28  0
                 if (t instanceof Error)
 29  
                 {
 30  0
                     throw (Error)t;
 31  
                 }
 32  0
                 else if (t instanceof RuntimeException)
 33  
                 {
 34  0
                     throw (RuntimeException)t;
 35  
                 }
 36  
             }
 37  
 
 38  
         }
 39  0
     }
 40  
 }