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