public class InvalidInputException extends Exception { InvalidInputException() { super("Cannot handle empty input"); } InvalidInputException(String input, Throwable cause) { super(String.format("Cannot handle input: \"%s\"", input), cause); } }