01: package argparser;
02:
03: import java.io.IOException;
04:
05: /**
06: * Exception class used by <code>ArgParser</code> when
07: * command line arguments contain an error.
08: *
09: * @author John E. Lloyd, Fall 2004
10: * @see ArgParser
11: */
12: public class ArgParseException extends IOException {
13: /**
14: * Creates a new ArgParseException with the given message.
15: *
16: * @param msg Exception message
17: */
18: public ArgParseException(String msg) {
19: super (msg);
20: }
21:
22: /**
23: * Creates a new ArgParseException from the given
24: * argument and message.
25: *
26: * @param arg Offending argument
27: * @param msg Error message
28: */
29: public ArgParseException(String arg, String msg) {
30: super (arg + ": " + msg);
31: }
32: }
|