1 /* SQLWarning.java -- Database access warnings.
2 Copyright (C) 1999, 2000 Free Software Foundation, Inc.
4 This file is part of GNU Classpath.
6 GNU Classpath is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 GNU Classpath is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU Classpath; see the file COPYING. If not, write to the
18 Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
21 As a special exception, if you link this library with other files to
22 produce an executable, this library does not by itself cause the
23 resulting executable to be covered by the GNU General Public License.
24 This exception does not however invalidate any other reasons why the
25 executable file might be covered by the GNU General Public License. */
31 * This exception is thrown when a database warning occurs.
33 * @author Aaron M. Renn (arenn@urbanophile.com)
35 public class SQLWarning extends SQLException
38 /*************************************************************************/
45 * This is the serialization UID for this class
47 private static final long serialVersionUID = 3917336774604784856L;
49 /*************************************************************************/
56 * This method initializes a new instance of <code>SQLWarning</code>
57 * that does not have a descriptive messages and SQL state, and which
58 * has a vendor error code of 0.
66 /*************************************************************************/
69 * This method initializes a new instance of <code>SQLWarning</code>
70 * with the specified descriptive error message. The SQL state of this
71 * instance will be <code>null</code> and the vendor error code will be 0.
73 * @param message A string describing the nature of the error.
76 SQLWarning(String message)
78 this(message, null, 0);
81 /*************************************************************************/
84 * This method initializes a new instance of <code>SQLWarning</code>
85 * with the specified descriptive error message and SQL state string.
86 * The vendor error code of this instance will be 0.
88 * @param message A string describing the nature of the error.
89 * @param SQLState A string containing the SQL state of the error.
92 SQLWarning(String message, String SQLState)
94 this(message, SQLState, 0);
97 /*************************************************************************/
100 * This method initializes a nwe instance of <code>SQLWarning</code>
101 * with the specified descriptive error message, SQL state string, and
104 * @param message A string describing the nature of the error.
105 * @param SQLState A string containing the SQL state of the error.
106 * @param vendorCode The vendor error code associated with this error.
109 SQLWarning(String message, String SQLState, int vendorCode)
111 super(message, SQLState, vendorCode);
114 /*************************************************************************/
121 * This method returns the exception that is chained to this object.
123 * @return The exception chained to this object, which may be
129 return((SQLWarning)super.getNextException());
132 /*************************************************************************/
135 * This method adds a new exception to the end of the chain of exceptions
136 * that are chained to this object.
138 * @param e The exception to add to the end of the chain.
141 setNextWarning(SQLWarning e)
143 super.setNextException(e);
146 } // class SQLWarning