Class ExceptionFactory

java.lang.Object
org.apache.derby.iapi.jdbc.ExceptionFactory
Direct Known Subclasses:
SQLExceptionFactory

public abstract class ExceptionFactory extends Object
An exception factory is used to create SQLExceptions of the correct type.
  • Field Details

    • INSTANCE

      private static final ExceptionFactory INSTANCE
      The singleton ExceptionFactory instance.
  • Constructor Details

    • ExceptionFactory

      public ExceptionFactory()
  • Method Details

    • getInstance

      public static ExceptionFactory getInstance()
      Get the singleton exception factory instance.
      Returns:
      an ExceptionFactory instance
    • getSQLException

      public abstract SQLException getSQLException(String message, String messageId, SQLException next, int severity, Throwable cause, Object... args)
      Construct an SQLException whose message and severity are specified explicitly.
      Parameters:
      message - the exception message
      messageId - the message id
      next - the next SQLException
      severity - the severity of the exception
      cause - the cause of the exception
      args - the message arguments
      Returns:
      an SQLException
    • getSQLException

      public abstract SQLException getSQLException(String messageId, SQLException next, Throwable cause, Object... args)
      Construct an SQLException whose message and severity are derived from the message id.
      Parameters:
      messageId - the message id
      next - the next SQLException
      cause - the cause of the exception
      args - the message arguments
      Returns:
      an SQLException