1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 package com.sun.star.comp.helper;
29 
30 /**
31  * BootstrapException is a checked exception that wraps an exception
32  * thrown by the original target.
33  *
34  * @since UDK 3.1.0
35  */
36 public class BootstrapException extends java.lang.Exception {
37 
38     /**
39      * This field holds the target exception.
40      */
41     private Exception m_target = null;
42 
43     /**
44      * Constructs a <code>BootstrapException</code> with <code>null</code> as
45      * the target exception.
46      */
47     public BootstrapException() {
48         super();
49     }
50 
51     /**
52      * Constructs a <code>BootstrapException</code> with the specified
53      * detail message.
54      *
55 	 * @param  message   the detail message
56      */
57     public BootstrapException( String message ) {
58         super( message );
59     }
60 
61     /**
62      * Constructs a <code>BootstrapException</code> with the specified
63      * detail message and a target exception.
64      *
65 	 * @param  message   the detail message
66 	 * @param  target    the target exception
67      */
68     public BootstrapException( String message, Exception target ) {
69         super( message );
70         m_target = target;
71     }
72 
73     /**
74      * Constructs a <code>BootstrapException</code> with a target exception.
75      *
76 	 * @param  target    the target exception
77      */
78     public BootstrapException( Exception target ) {
79         super();
80         m_target = target;
81     }
82 
83     /**
84      * Get the thrown target exception.
85      *
86      * @return the target exception
87      */
88     public Exception getTargetException() {
89         return m_target;
90     }
91 }
92