View Javadoc
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.api;
8   
9   import org.mule.config.i18n.Message;
10  import org.mule.config.i18n.MessageFactory;
11  
12  /**
13   * <code>MuleException</code> Is the base exception type for the Mule application
14   * any other exceptions thrown by Mule code will be based on this exception.
15   */
16  public class DefaultMuleException extends MuleException
17  {
18      /**
19       * Serial version
20       */
21      private static final long serialVersionUID = 2554735072826262515L;
22  
23      public DefaultMuleException(String message)
24      {
25          this(MessageFactory.createStaticMessage(message));
26      }
27  
28      /**
29       * @param message the exception message
30       */
31      public DefaultMuleException(Message message)
32      {
33          super(message);
34      }
35  
36      public DefaultMuleException(String message, Throwable cause)
37      {
38          this(MessageFactory.createStaticMessage(message), cause);
39      }
40  
41      /**
42       * @param message the exception message
43       * @param cause the exception that cause this exception to be thrown
44       */
45      public DefaultMuleException(Message message, Throwable cause)
46      {
47          super(message, cause);
48      }
49  
50      public DefaultMuleException(Throwable cause)
51      {
52          super(cause);
53      }
54  }