|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
tcl.lang.TclException
tcl.lang.TclNumArgsException
public class TclNumArgsException
This exception is used to report wrong number of arguments in Tcl scripts.
Field Summary |
---|
Fields inherited from class tcl.lang.TclException |
---|
errIndex |
Constructor Summary | |
---|---|
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. |
Method Summary |
---|
Methods inherited from class tcl.lang.TclException |
---|
getCompletionCode, setCompletionCode |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public 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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |