Coverage Report - org.mule.example.errorhandler.ErrorMessage
 
Classes in this File Line Coverage Branch Coverage Complexity
ErrorMessage
0%
0/24
N/A
1
 
 1  
 /*
 2  
  * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
 3  
  * The software in this package is published under the terms of the CPAL v1.0
 4  
  * license, a copy of which has been included with this distribution in the
 5  
  * LICENSE.txt file.
 6  
  */
 7  
 package org.mule.example.errorhandler;
 8  
 
 9  
 import java.util.HashMap;
 10  
 import java.util.Map;
 11  
 
 12  
 /**
 13  
  * The <code>ErrorMessage</code> represents an exception.
 14  
  */
 15  
 public class ErrorMessage
 16  
 {
 17  
     // Bean representing the Exception
 18  
     private ExceptionBean exception;
 19  
     // The exception itself, in its primitive state
 20  
     private Throwable throwable;
 21  
     // Properties for this object
 22  0
     private Map properties = new HashMap();
 23  
 
 24  
     /**
 25  
      *
 26  
      */
 27  
     public ErrorMessage()
 28  
     {
 29  0
         super();
 30  0
     }
 31  
 
 32  
     public ErrorMessage(ExceptionBean exception) throws InstantiationException
 33  0
     {
 34  0
         setException(exception);
 35  0
     }
 36  
 
 37  
     public ErrorMessage(Throwable exception)
 38  0
     {
 39  0
         setThrowable(exception);
 40  0
     }
 41  
 
 42  
     public ErrorMessage(Throwable exception, Map props)
 43  0
     {
 44  0
         setThrowable(exception);
 45  0
         setProperties(props);
 46  0
     }
 47  
 
 48  
     /**
 49  
      * @return Returns the exception.
 50  
      */
 51  
     public ExceptionBean getException()
 52  
     {
 53  0
         return exception;
 54  
     }
 55  
 
 56  
     /**
 57  
      * @param exception The exception to set.
 58  
      */
 59  
     public void setException(ExceptionBean exception) throws InstantiationException
 60  
     {
 61  0
         this.exception = exception;
 62  0
         throwable = exception.toException();
 63  0
     }
 64  
 
 65  
     /**
 66  
      * @return Returns the properties.
 67  
      */
 68  
     public Map getProperties()
 69  
     {
 70  0
         return properties;
 71  
     }
 72  
 
 73  
     /**
 74  
      * @param properties The properties to set.
 75  
      */
 76  
     public void setProperties(Map properties)
 77  
     {
 78  0
         this.properties = properties;
 79  0
     }
 80  
 
 81  
     /**
 82  
      * @return Returns the throwable.
 83  
      */
 84  
     public Throwable getThrowable()
 85  
     {
 86  0
         return throwable;
 87  
     }
 88  
 
 89  
     /**
 90  
      * @param throwable The throwable to set.
 91  
      */
 92  
     public void setThrowable(Throwable throwable)
 93  
     {
 94  0
         this.throwable = throwable;
 95  0
         exception = new ExceptionBean(throwable);
 96  0
     }
 97  
 
 98  
 }