public class TclNumArgsException extends TclException
errIndex| Constructor and Description |
|---|
TclNumArgsException(Interp interp,
int argc,
TclObject[] argv,
java.lang.String message)
Creates a TclException with the appropiate Tcl error
message for having the wring number of arguments to a Tcl command.
|
getCompletionCode, setCompletionCodepublic TclNumArgsException(Interp interp, int argc, TclObject[] argv, java.lang.String message) throws TclException
Example:
if (argv.length != 3) {
throw new TclNumArgsException(interp, 1, argv, "option name");
}
interp - current Interpreter.argc - the number of arguments to copy from the offending
command to put into the error message.argv - the arguments of the offending command.message - extra message to appear in the error message that
explains the proper usage of the command.TclException - is always thrown.