package org.simplx.args; /** * Signals that the user specified an option in an improper way. The most common * errors are not providing an argument to an option that needed one or * specifying an unknown option. * * @author Ken Arnold */ public class ProgramOptionException extends RuntimeException { private static final long serialVersionUID = 4503820475450471907L; /** * Creates an "Argument required" exception for the given option. * * @param opt The option. */ public ProgramOptionException(Object opt) { super("Argument required for '" + opt + "'"); } /** * Creates an exception with the given detail string. * * @param msg A descriptive message. */ public ProgramOptionException(String msg) { super(msg); } /** * Creates an exception with the given detail string and cause. * * @param msg A descriptive message. * @param cause The related exception. */ public ProgramOptionException(String msg, Throwable cause) { super(msg, cause); } }