Class TaskPersistenceException

All Implemented Interfaces:
Serializable

public class TaskPersistenceException extends TaskStoreException
Exception for database/storage system failures during task persistence operations.

Indicates failures in the underlying storage system (database, filesystem, etc.) rather than data format issues.

Common Scenarios

  • Database connection timeout or network partition
  • Transaction deadlock or lock wait timeout
  • Connection pool exhausted
  • Disk full / storage quota exceeded
  • Database constraint violations (unique key, foreign key)
  • Insufficient permissions or authentication failures
  • Database schema incompatibilities

Usage Example


 try {
     em.merge(jpaTask);
 } catch (PersistenceException e) {
     throw new TaskPersistenceException(taskId, "Database save failed", e);
 }
 
See Also:
  • Constructor Details

    • TaskPersistenceException

      public TaskPersistenceException()
      Creates a new TaskPersistenceException with no message or cause.
    • TaskPersistenceException

      public TaskPersistenceException(String msg)
      Creates a new TaskPersistenceException with the specified message.
      Parameters:
      msg - the exception message
    • TaskPersistenceException

      public TaskPersistenceException(Throwable cause)
      Creates a new TaskPersistenceException with the specified cause.
      Parameters:
      cause - the underlying cause
    • TaskPersistenceException

      public TaskPersistenceException(String msg, Throwable cause)
      Creates a new TaskPersistenceException with the specified message and cause.
      Parameters:
      msg - the exception message
      cause - the underlying cause
    • TaskPersistenceException

      public TaskPersistenceException(@Nullable String taskId, String msg)
      Creates a new TaskPersistenceException with the specified task ID and message.
      Parameters:
      taskId - the task identifier (may be null for operations not tied to a specific task)
      msg - the exception message
    • TaskPersistenceException

      public TaskPersistenceException(@Nullable String taskId, String msg, Throwable cause)
      Creates a new TaskPersistenceException with the specified task ID, message, and cause.
      Parameters:
      taskId - the task identifier (may be null for operations not tied to a specific task)
      msg - the exception message
      cause - the underlying cause