@SuppressWarnings("serial") public class NegativeIntegerException extends Exception { public NegativeIntegerException() { super("Negative integer!"); } public NegativeIntegerException(String message) { super(message); } }