tcl.lang
Class TclNumArgsException
java.lang.Object
java.lang.Throwable
java.lang.Exception
tcl.lang.TclException
tcl.lang.TclNumArgsException
- All Implemented Interfaces:
- Serializable
public class TclNumArgsException
- extends TclException
This exception is used to report wrong number of arguments in Tcl scripts.
- See Also:
- Serialized Form
Constructor Summary |
TclNumArgsException(Interp interp,
int argc,
TclObject[] argv,
String message)
Creates a TclException with the appropiate Tcl error message for having
the wring number of arguments to a Tcl command. |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
TclNumArgsException
public TclNumArgsException(Interp interp,
int argc,
TclObject[] argv,
String message)
throws TclException
- Creates a TclException with the appropiate Tcl error message for having
the wring number of arguments to a Tcl command.
Example:
if (argv.length != 3) {
throw new TclNumArgsException(interp, 1, argv, "option name");
}
- Parameters:
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.
- Throws:
TclException
- is always thrown.
Copyright © 2015. All rights reserved.