Class FilizerExceptions

java.lang.Object
io.github.monsieurdoceo.filizer.shared.exceptions.FilizerExceptions

public final class FilizerExceptions extends Object
Centralized factory for Filizer runtime exceptions.
  • Constructor Details

    • FilizerExceptions

      public FilizerExceptions(AppLogger logger)
      Creates a new exception factory.
      Parameters:
      logger - the application logger
  • Method Details

    • fileNotFound

      public IllegalArgumentException fileNotFound(String name, Throwable cause)
      Creates an exception for a missing file.
      Parameters:
      name - the file name
      cause - the original cause
      Returns:
      the exception to throw
    • invalidFilePath

      public IllegalArgumentException invalidFilePath(Path path, String name, Throwable cause)
      Creates an exception for an invalid file path or name.
      Parameters:
      path - the file path
      name - the file name
      cause - the original cause
      Returns:
      the exception to throw
    • invalidFileName

      public IllegalArgumentException invalidFileName(String name, Throwable cause)
      Creates an exception for an invalid file name.
      Parameters:
      name - the file name
      cause - the original cause
      Returns:
      the exception to throw
    • fileCreationFailed

      public IllegalStateException fileCreationFailed(Path path, String name, Throwable cause)
      Creates an exception for a failed file creation.
      Parameters:
      path - the file path
      name - the file name
      cause - the original cause
      Returns:
      the exception to throw
    • fileDeletionFailed

      public IllegalStateException fileDeletionFailed(String name, Throwable cause)
      Creates an exception for a failed file deletion.
      Parameters:
      name - the file name
      cause - the original cause
      Returns:
      the exception to throw
    • fileSaveFailed

      public IllegalStateException fileSaveFailed(String name, Throwable cause)
      Creates an exception for a failed file save.
      Parameters:
      name - the file name
      cause - the original cause
      Returns:
      the exception to throw
    • ambiguousFileName

      public void ambiguousFileName(String name)
      Logs an ambiguous file lookup.
      Parameters:
      name - the file name