Class TaskSerializationException

All Implemented Interfaces:
Serializable

public class TaskSerializationException extends TaskStoreException
Exception for task serialization/deserialization failures.

Indicates failures converting between Task domain objects and persistent storage format (JSON).

Common Scenarios

  • JSON parsing errors during get() operations
  • JSON serialization errors during save() operations
  • Invalid enum values or missing required fields
  • Data format version mismatches after upgrades

Usage Example


 try {
     Task task = jsonMapper.readValue(json, Task.class);
 } catch (JsonProcessingException e) {
     throw new TaskSerializationException(taskId, "Failed to deserialize task", e);
 }
 
See Also:
  • Constructor Details

    • TaskSerializationException

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

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

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

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

      public TaskSerializationException(@Nullable String taskId, String msg)
      Creates a new TaskSerializationException 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
    • TaskSerializationException

      public TaskSerializationException(@Nullable String taskId, String msg, Throwable cause)
      Creates a new TaskSerializationException 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