KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > derby > shared > common > error > ExceptionSeverity


1 /*
2
3    Derby - Class org.apache.derby.iapi.error.ExceptionSeverity
4
5    Licensed to the Apache Software Foundation (ASF) under one or more
6    contributor license agreements. See the NOTICE file distributed with
7    this work for additional information regarding copyright ownership.
8    The ASF licenses this file to you under the Apache License, Version 2.0
9    (the "License"); you may not use this file except in compliance with
10    the License. You may obtain a copy of the License at
11
12       http://www.apache.org/licenses/LICENSE-2.0
13
14    Unless required by applicable law or agreed to in writing, software
15    distributed under the License is distributed on an "AS IS" BASIS,
16    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17    See the License for the specific language governing permissions and
18    limitations under the License.
19
20  */

21
22 package org.apache.derby.shared.common.error;
23
24 /**
25  * Severity constants for SQLExceptions.
26  *
27  * These constants are used in the ErrorCode available on a SQLException
28  * to provide information about the severity of the error.
29  *
30  * @see java.sql.SQLException
31  */

32 public interface ExceptionSeverity
33 {
34     /*
35      * Use NO_APPLICABLE_SEVERITY for internal errors and unit
36      * tests that don't need to report or worry about severities.
37      */

38     /**
39      * NO_APPLICABLE_SEVERITY occurs only when the system was
40      * unable to determine the severity.
41      */

42     public static final int NO_APPLICABLE_SEVERITY = 0;
43     /**
44      * WARNING_SEVERITY is associated with SQLWarnings.
45      */

46     public static final int WARNING_SEVERITY = 10000;
47     /**
48      * STATEMENT_SEVERITY is associated with errors which
49      * cause only the current statement to be aborted.
50      */

51     public static final int STATEMENT_SEVERITY = 20000;
52     /**
53      * TRANSACTION_SEVERITY is associated with those errors which
54      * cause the current transaction to be aborted.
55      */

56     public static final int TRANSACTION_SEVERITY = 30000;
57     /**
58      * SESSION_SEVERITY is associated with errors which
59      * cause the current connection to be closed.
60      */

61     public static final int SESSION_SEVERITY = 40000;
62     /**
63      * DATABASE_SEVERITY is associated with errors which
64      * cause the current database to be closed.
65      */

66     public static final int DATABASE_SEVERITY = 45000;
67     /**
68      * SYSTEM_SEVERITY is associated with internal errors which
69      * cause the system to shut down.
70      */

71     public static final int SYSTEM_SEVERITY = 50000;
72 }
73
74
75
Popular Tags