Class DatabaseException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
database.DatabaseException
- All Implemented Interfaces:
Serializable
資料庫操作失敗時拋出的非受檢例外。
繼承自 RuntimeException,用於將 JDBC 的受檢 SQLException
或其他資料庫錯誤包裝為非受檢形式,避免在呼叫鏈上強制宣告 throws。
支援訊息字串與訊息加原因兩種建構形式,便於保留原始堆疊追蹤。
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDatabaseException(String msg) DatabaseException(String message, Throwable cause) -
Method Summary
Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
DatabaseException
-
DatabaseException
-