01: /*
02:
03: Derby - Class org.apache.derby.iapi.error.ExceptionSeverity
04:
05: Licensed to the Apache Software Foundation (ASF) under one or more
06: contributor license agreements. See the NOTICE file distributed with
07: this work for additional information regarding copyright ownership.
08: The ASF licenses this file to you under the Apache License, Version 2.0
09: (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: * Use NO_APPLICABLE_SEVERITY for internal errors and unit
35: * tests that don't need to report or worry about severities.
36: */
37: /**
38: * NO_APPLICABLE_SEVERITY occurs only when the system was
39: * unable to determine the severity.
40: */
41: public static final int NO_APPLICABLE_SEVERITY = 0;
42: /**
43: * WARNING_SEVERITY is associated with SQLWarnings.
44: */
45: public static final int WARNING_SEVERITY = 10000;
46: /**
47: * STATEMENT_SEVERITY is associated with errors which
48: * cause only the current statement to be aborted.
49: */
50: public static final int STATEMENT_SEVERITY = 20000;
51: /**
52: * TRANSACTION_SEVERITY is associated with those errors which
53: * cause the current transaction to be aborted.
54: */
55: public static final int TRANSACTION_SEVERITY = 30000;
56: /**
57: * SESSION_SEVERITY is associated with errors which
58: * cause the current connection to be closed.
59: */
60: public static final int SESSION_SEVERITY = 40000;
61: /**
62: * DATABASE_SEVERITY is associated with errors which
63: * cause the current database to be closed.
64: */
65: public static final int DATABASE_SEVERITY = 45000;
66: /**
67: * SYSTEM_SEVERITY is associated with internal errors which
68: * cause the system to shut down.
69: */
70: public static final int SYSTEM_SEVERITY = 50000;
71: }
|