1*1a37d047SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*1a37d047SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*1a37d047SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*1a37d047SAndrew Rist * distributed with this work for additional information 6*1a37d047SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*1a37d047SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*1a37d047SAndrew Rist * "License"); you may not use this file except in compliance 9*1a37d047SAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 11*1a37d047SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 13*1a37d047SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*1a37d047SAndrew Rist * software distributed under the License is distributed on an 15*1a37d047SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*1a37d047SAndrew Rist * KIND, either express or implied. See the License for the 17*1a37d047SAndrew Rist * specific language governing permissions and limitations 18*1a37d047SAndrew Rist * under the License. 19cdf0e10cSrcweir * 20*1a37d047SAndrew Rist *************************************************************/ 21*1a37d047SAndrew Rist 22*1a37d047SAndrew Rist 23cdf0e10cSrcweir package com.sun.star.report; 24cdf0e10cSrcweir 25cdf0e10cSrcweir /** 26cdf0e10cSrcweir * A general exception to indicate that there was an error while accessing the 27cdf0e10cSrcweir * datasource. 28cdf0e10cSrcweir * 29cdf0e10cSrcweir * @author Thomas Morgner 30cdf0e10cSrcweir */ 31cdf0e10cSrcweir public class DataSourceException extends Exception 32cdf0e10cSrcweir { 33cdf0e10cSrcweir 34cdf0e10cSrcweir /** 35cdf0e10cSrcweir * Constructs a new exception with <code>null</code> as its detail message. 36cdf0e10cSrcweir * The cause is not initialized, and may subsequently be initialized by a call 37cdf0e10cSrcweir * to {@link #initCause}. 38cdf0e10cSrcweir */ DataSourceException()39cdf0e10cSrcweir public DataSourceException() 40cdf0e10cSrcweir { 41cdf0e10cSrcweir super(); 42cdf0e10cSrcweir } 43cdf0e10cSrcweir 44cdf0e10cSrcweir /** 45cdf0e10cSrcweir * Constructs a new exception with the specified detail message. The cause is 46cdf0e10cSrcweir * not initialized, and may subsequently be initialized by a call to {@link 47cdf0e10cSrcweir * #initCause}. 48cdf0e10cSrcweir * 49cdf0e10cSrcweir * @param message the detail message. The detail message is saved for later 50cdf0e10cSrcweir * retrieval by the {@link #getMessage()} method. 51cdf0e10cSrcweir */ DataSourceException(String message)52cdf0e10cSrcweir public DataSourceException(String message) 53cdf0e10cSrcweir { 54cdf0e10cSrcweir super(message); 55cdf0e10cSrcweir } 56cdf0e10cSrcweir 57cdf0e10cSrcweir /** 58cdf0e10cSrcweir * Constructs a new exception with the specified detail message and cause. 59cdf0e10cSrcweir * <p>Note that the detail message associated with <code>cause</code> is 60cdf0e10cSrcweir * <i>not</i> automatically incorporated in this exception's detail message. 61cdf0e10cSrcweir * 62cdf0e10cSrcweir * @param message the detail message (which is saved for later retrieval by 63cdf0e10cSrcweir * the {@link #getMessage()} method). 64cdf0e10cSrcweir * @param cause the cause (which is saved for later retrieval by the {@link 65cdf0e10cSrcweir * #getCause()} method). (A <tt>null</tt> value is permitted, 66cdf0e10cSrcweir * and indicates that the cause is nonexistent or unknown.) 67cdf0e10cSrcweir * @since 1.4 68cdf0e10cSrcweir */ DataSourceException(String message, Throwable cause)69cdf0e10cSrcweir public DataSourceException(String message, Throwable cause) 70cdf0e10cSrcweir { 71cdf0e10cSrcweir super(message, cause); 72cdf0e10cSrcweir } 73cdf0e10cSrcweir 74cdf0e10cSrcweir /** 75cdf0e10cSrcweir * Constructs a new exception with the specified cause and a detail message of 76cdf0e10cSrcweir * <tt>(cause==null ? null : cause.toString())</tt> (which typically contains 77cdf0e10cSrcweir * the class and detail message of <tt>cause</tt>). This constructor is useful 78cdf0e10cSrcweir * for exceptions that are little more than wrappers for other throwables (for 79cdf0e10cSrcweir * example, {@link PrivilegedActionException}). 80cdf0e10cSrcweir * 81cdf0e10cSrcweir * @param cause the cause (which is saved for later retrieval by the {@link 82cdf0e10cSrcweir * #getCause()} method). (A <tt>null</tt> value is permitted, 83cdf0e10cSrcweir * and indicates that the cause is nonexistent or unknown.) 84cdf0e10cSrcweir * @since 1.4 85cdf0e10cSrcweir */ DataSourceException(Throwable cause)86cdf0e10cSrcweir public DataSourceException(Throwable cause) 87cdf0e10cSrcweir { 88cdf0e10cSrcweir super(cause); 89cdf0e10cSrcweir } 90cdf0e10cSrcweir } 91