Class SQLiteErrorClassifier
java.lang.Object
dev.rafex.ether.database.sqlite.errors.SQLiteErrorClassifier
Classifies SQLite errors.
Currently returns DatabaseAccessException for all SQLite errors.
In the future, this could be extended to return more specific exception types.
-
Method Summary
Modifier and TypeMethodDescriptionstatic dev.rafex.ether.database.core.exceptions.DatabaseAccessExceptionclassify(String message, SQLException exception) Classifies a SQLite exception with a custom message.static dev.rafex.ether.database.core.exceptions.DatabaseAccessExceptionclassify(SQLException exception) Classifies a SQLite exception.
-
Method Details
-
classify
public static dev.rafex.ether.database.core.exceptions.DatabaseAccessException classify(SQLException exception) Classifies a SQLite exception.- Parameters:
exception- the SQL exception to classify- Returns:
- a runtime exception (currently always
DatabaseAccessException) - Throws:
NullPointerException- ifexceptionisnull
-
classify
public static dev.rafex.ether.database.core.exceptions.DatabaseAccessException classify(String message, SQLException exception) Classifies a SQLite exception with a custom message.- Parameters:
message- the custom error messageexception- the SQL exception to classify- Returns:
- a runtime exception (currently always
DatabaseAccessException) - Throws:
NullPointerException- ifexceptionisnull
-