Class PaintException

All Implemented Interfaces:
Serializable

public final class PaintException extends IllegalArgumentException
Signals a failure the sender can correct, carrying its typed PaintError.

Extends IllegalArgumentException so existing validation callers keep working, while command handling reads error() instead of parsing text.

See Also:
  • Constructor Details

    • PaintException

      public PaintException(PaintError error)
      Creates an exception for a typed failure.
      Parameters:
      error - failure kind
    • PaintException

      public PaintException(PaintError error, Throwable cause)
      Creates an exception that keeps the underlying cause.
      Parameters:
      error - failure kind
      cause - original failure
  • Method Details

    • error

      public PaintError error()
      Returns the failure kind.
      Returns:
      typed error