Class SQLiteErrorClassifier

java.lang.Object
dev.rafex.ether.database.sqlite.errors.SQLiteErrorClassifier

public final class SQLiteErrorClassifier extends Object
Classifies SQLite errors.

Currently returns DatabaseAccessException for all SQLite errors. In the future, this could be extended to return more specific exception types.

  • 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 - if exception is null
    • 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 message
      exception - the SQL exception to classify
      Returns:
      a runtime exception (currently always DatabaseAccessException)
      Throws:
      NullPointerException - if exception is null