gnu.mapping
Class WrongArguments

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by java.lang.IllegalArgumentException
                  extended by gnu.mapping.WrongArguments
All Implemented Interfaces:
java.io.Serializable

public class WrongArguments
extends java.lang.IllegalArgumentException

See Also:
Serialized Form

Field Summary
 int number
           
 java.lang.String procname
           
 java.lang.String usage
           
 
Constructor Summary
WrongArguments(Procedure proc, int argCount)
           
WrongArguments(java.lang.String name, int n, java.lang.String u)
           
 
Method Summary
static java.lang.String checkArgCount(Procedure proc, int argCount)
          Returns an error message if the number of arguments in a call is invalid.
static java.lang.String checkArgCount(java.lang.String pname, int min, int max, int argCount)
           
 java.lang.String getMessage()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

number

public int number

usage

public java.lang.String usage

procname

public java.lang.String procname
Constructor Detail

WrongArguments

public WrongArguments(Procedure proc,
                      int argCount)

WrongArguments

public WrongArguments(java.lang.String name,
                      int n,
                      java.lang.String u)
Method Detail

checkArgCount

public static java.lang.String checkArgCount(Procedure proc,
                                             int argCount)
Returns an error message if the number of arguments in a call is invalid.

Parameters:
proc - the Procedure being called
argCount - the number of arguments in the call
Returns:
null, if the number of arguments is ok; otherwise a suitable error message

checkArgCount

public static java.lang.String checkArgCount(java.lang.String pname,
                                             int min,
                                             int max,
                                             int argCount)

getMessage

public java.lang.String getMessage()
Overrides:
getMessage in class java.lang.Throwable