KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > osgi > service > pluginconversion > PluginConversionException


1 /*******************************************************************************
2  * Copyright (c) 2004, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.osgi.service.pluginconversion;
12
13 /**
14  * Custom exception for errors that can happen during plugin conversion.
15  *
16  * @since 3.0
17  */

18 public class PluginConversionException extends Exception JavaDoc {
19     private static final long serialVersionUID = 3258130258472284472L;
20
21     /**
22      * Nested exception.
23      */

24     private transient Throwable JavaDoc cause;
25
26     /**
27      * Constructor for the class.
28      */

29     public PluginConversionException() {
30         super();
31     }
32
33     /**
34      * Create a new exception with the given message.
35      *
36      * @param message the message for the exception
37      */

38     public PluginConversionException(String JavaDoc message) {
39         super(message);
40     }
41
42     /**
43      * Create a new exception with the given message and nested exception.
44      *
45      * @param message the message for the exception
46      * @param cause the nested exception
47      */

48     public PluginConversionException(String JavaDoc message, Throwable JavaDoc cause) {
49         super(message);
50         this.cause = cause;
51     }
52
53     /**
54      * Create a new exception with the given nested exception.
55      *
56      * @param cause the nested exception
57      */

58     public PluginConversionException(Throwable JavaDoc cause) {
59         this.cause = cause;
60     }
61
62     /**
63      * Return the nested exception for this exception or <code>null</code>
64      * if there is none.
65      *
66      * @return the nested exception or <code>null</code>
67      */

68     public Throwable JavaDoc getCause() {
69         return cause;
70     }
71 }
72
Popular Tags