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