Class DataAccessException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.ntu.fdae.group1.bto.exceptions.DataAccessException
All Implemented Interfaces:
Serializable

public class DataAccessException extends RuntimeException
Exception thrown when there are issues accessing or manipulating data in repositories.

This exception serves as a wrapper for various data-related errors that might occur during repository operations, such as: - File I/O errors when reading from or writing to persistent storage - Data format errors when parsing stored data - Consistency errors when data violates integrity constraints - Network errors when accessing remote data sources

By using this exception consistently across repositories, the application can handle data access errors in a uniform way in higher layers.

See Also:
  • Constructor Details

    • DataAccessException

      public DataAccessException(String message)
      Constructs a new DataAccessException with a detailed message.
      Parameters:
      message - The detail message explaining the error
    • DataAccessException

      public DataAccessException(String message, Throwable cause)
      Constructs a new DataAccessException with a detailed message and cause.

      This constructor is useful when wrapping lower-level exceptions that occurred during data access operations.

      Parameters:
      message - The detail message explaining the error
      cause - The underlying cause of this exception
    • DataAccessException

      public DataAccessException(Throwable cause)
      Constructs a new DataAccessException with a cause.

      This constructor is useful when rethrowing an existing exception that doesn't fit the standard exception hierarchy.

      Parameters:
      cause - The underlying cause of this exception