1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 package com.sun.star.comp.helper;
25 
26 /**
27  * BootstrapException is a checked exception that wraps an exception
28  * thrown by the original target.
29  *
30  * @since UDK 3.1.0
31  */
32 public class BootstrapException extends java.lang.Exception {
33 
34     /**
35      * This field holds the target exception.
36      */
37     private Exception m_target = null;
38 
39     /**
40      * Constructs a <code>BootstrapException</code> with <code>null</code> as
41      * the target exception.
42      */
BootstrapException()43     public BootstrapException() {
44         super();
45     }
46 
47     /**
48      * Constructs a <code>BootstrapException</code> with the specified
49      * detail message.
50      *
51 	 * @param  message   the detail message
52      */
BootstrapException( String message )53     public BootstrapException( String message ) {
54         super( message );
55     }
56 
57     /**
58      * Constructs a <code>BootstrapException</code> with the specified
59      * detail message and a target exception.
60      *
61 	 * @param  message   the detail message
62 	 * @param  target    the target exception
63      */
BootstrapException( String message, Exception target )64     public BootstrapException( String message, Exception target ) {
65         super( message );
66         m_target = target;
67     }
68 
69     /**
70      * Constructs a <code>BootstrapException</code> with a target exception.
71      *
72 	 * @param  target    the target exception
73      */
BootstrapException( Exception target )74     public BootstrapException( Exception target ) {
75         super();
76         m_target = target;
77     }
78 
79     /**
80      * Get the thrown target exception.
81      *
82      * @return the target exception
83      */
getTargetException()84     public Exception getTargetException() {
85         return m_target;
86     }
87 }
88