derby db 的错误代码列表在哪里?

Where is a list of Error Codes for derby db?

我正在使用德比数据库。我正在尝试关闭数据库。我收到:

----- SQLException -----
SQL State:  XJ004
Error Code: 40000
Message:    Database '<db name>' not found.

我可以在此处找到 SQL 个州:http://db.apache.org/derby/docs/10.8/ref/rrefexcept71493.html

列出XJ004: Database '<databaseName>' not found.

但是,我找不到 derby 的错误代码列表。

错误代码列表在哪里?

Derby 使用SQLException 中的错误代码来表示异常severity

The JDBC driver returns SQLExceptions for all errors from Derby. If the exception originated in a user type but is not itself an SQLException, it is wrapped in an SQLException. Derby-specific SQLExceptions use SQLState class codes starting with X. Standard SQLState values are returned for exceptions where appropriate.

Derby database exceptions are classified by severity. The severity of an SQLException is available through the getErrorCode method call on the SQLException. The severities are summarized below. For more information, check the javadoc for org.apache.derby.types.ExceptionSeverity:

常数是:

/**
 * NO_APPLICABLE_SEVERITY occurs only when the system was
 * unable to determine the severity.
 */
public static final int NO_APPLICABLE_SEVERITY = 0;
/**
 * WARNING_SEVERITY is associated with SQLWarnings.
 */
public static final int WARNING_SEVERITY = 10000;
/**
 * STATEMENT_SEVERITY is associated with errors which
 * cause only the current statement to be aborted.
 */
public static final int STATEMENT_SEVERITY = 20000;
/**
 * TRANSACTION_SEVERITY is associated with those errors which
 * cause the current transaction to be aborted.
 */
public static final int TRANSACTION_SEVERITY = 30000;
/**
 * SESSION_SEVERITY is associated with errors which
 * cause the current connection to be closed.
 */
public static final int SESSION_SEVERITY = 40000;
/**
 * DATABASE_SEVERITY is associated with errors which
 * cause the current database to be closed.
 */
public static final int DATABASE_SEVERITY = 45000;
/**
 * SYSTEM_SEVERITY is associated with internal errors which
 * cause the system to shut down.
 */
public static final int SYSTEM_SEVERITY = 50000;