KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mule > umo > transformer > TransformerException


1 /*
2  * $Id: TransformerException.java 3798 2006-11-04 04:07:14Z aperepel $
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 MuleSource MPL
7  * license, a copy of which has been included with this distribution in the
8  * LICENSE.txt file.
9  */

10
11 package org.mule.umo.transformer;
12
13 import org.mule.config.i18n.Message;
14 import org.mule.umo.endpoint.EndpointException;
15
16 /**
17  * <code>TransformerException</code> is a simple exception that is thrown by
18  * transformers.
19  *
20  * @author <a HREF="mailto:ross.mason@symphonysoft.com">Ross Mason</a>
21  * @version $Revision: 3798 $
22  */

23
24 public class TransformerException extends EndpointException
25 {
26     /**
27      * Serial version
28      */

29     private static final long serialVersionUID = 2943589828020763649L;
30
31     private transient UMOTransformer transformer;
32
33     /**
34      * @param message the exception message
35      */

36     public TransformerException(Message message, UMOTransformer transformer)
37     {
38         super(message);
39         this.transformer = transformer;
40         addInfo("Transformer", transformer.toString());
41     }
42
43     /**
44      * @param message the exception message
45      * @param cause the exception that cause this exception to be thrown
46      */

47     public TransformerException(Message message, UMOTransformer transformer, Throwable JavaDoc cause)
48     {
49         super(message, cause);
50         this.transformer = transformer;
51         addInfo("Transformer", transformer.toString());
52     }
53
54     public TransformerException(UMOTransformer transformer, Throwable JavaDoc cause)
55     {
56         super(cause);
57         this.transformer = transformer;
58         addInfo("Transformer", (transformer == null ? "null" : transformer.toString()));
59     }
60
61     /**
62      * @param message the exception message
63      * @param cause the exception that cause this exception to be thrown
64      */

65     public TransformerException(Message message, Throwable JavaDoc cause)
66     {
67         super(message, cause);
68     }
69
70     /**
71      * @param message the exception message
72      */

73     public TransformerException(Message message)
74     {
75         super(message);
76     }
77
78     public UMOTransformer getTransformer()
79     {
80         return transformer;
81     }
82 }
83
Popular Tags