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 package com.sun.star.report;
24 
25 /**
26  * A general exception to indicate that there was an error while accessing the
27  * datasource.
28  *
29  * @author Thomas Morgner
30  */
31 public class DataSourceException extends Exception
32 {
33 
34     /**
35      * Constructs a new exception with <code>null</code> as its detail message.
36      * The cause is not initialized, and may subsequently be initialized by a call
37      * to {@link #initCause}.
38      */
DataSourceException()39     public DataSourceException()
40     {
41         super();
42     }
43 
44     /**
45      * Constructs a new exception with the specified detail message.  The cause is
46      * not initialized, and may subsequently be initialized by a call to {@link
47      * #initCause}.
48      *
49      * @param message the detail message. The detail message is saved for later
50      *                retrieval by the {@link #getMessage()} method.
51      */
DataSourceException(String message)52     public DataSourceException(String message)
53     {
54         super(message);
55     }
56 
57     /**
58      * Constructs a new exception with the specified detail message and cause.
59      * <p>Note that the detail message associated with <code>cause</code> is
60      * <i>not</i> automatically incorporated in this exception's detail message.
61      *
62      * @param message the detail message (which is saved for later retrieval by
63      *                the {@link #getMessage()} method).
64      * @param cause   the cause (which is saved for later retrieval by the {@link
65      *                #getCause()} method).  (A <tt>null</tt> value is permitted,
66      *                and indicates that the cause is nonexistent or unknown.)
67      * @since 1.4
68      */
DataSourceException(String message, Throwable cause)69     public DataSourceException(String message, Throwable cause)
70     {
71         super(message, cause);
72     }
73 
74     /**
75      * Constructs a new exception with the specified cause and a detail message of
76      * <tt>(cause==null ? null : cause.toString())</tt> (which typically contains
77      * the class and detail message of <tt>cause</tt>). This constructor is useful
78      * for exceptions that are little more than wrappers for other throwables (for
79      * example, {@link PrivilegedActionException}).
80      *
81      * @param cause the cause (which is saved for later retrieval by the {@link
82      *              #getCause()} method).  (A <tt>null</tt> value is permitted,
83      *              and indicates that the cause is nonexistent or unknown.)
84      * @since 1.4
85      */
DataSourceException(Throwable cause)86     public DataSourceException(Throwable cause)
87     {
88         super(cause);
89     }
90 }
91