Class WriterErrorMessageHelper

Object
WriterErrorMessageHelper

public class WriterErrorMessageHelper extends Object
Helps create similar error messages among StackWriters.
Author:
Owen Feehan
  • Method Details

    • generalWriteException

      public static <T extends StackWriter> ImageIOException generalWriteException(Class<T> writerClass, Path path, Exception cause)
      Creates a ImageIOException with an error message that image-writing failed.
      Type Parameters:
      T - the writer in which the writing failed.
      Parameters:
      writerClass - class corresponding to <T>.
      path - the path that the image was been written to, when failure occurred.
      cause - the cause of failure.
      Returns:
      an exception that can be thrown describing the failure.