gnu.mapping

Class WrongType


public class WrongType
extends WrappedException

Exception thrown when a procedure parameter has the wrong type.

Field Summary

static int
ARG_CAST
number==ARG_CAST means a general cast.
static int
ARG_DESCRIPTION
number==ARG_DESCRIPTION means not a call, procname describes the target.
static int
ARG_UNKNOWN
number==ARG_UNKNOWN means unknown argument number.
static int
ARG_VARNAME
number==ARG_VARNAME means not a call, procname is a variable name.
Object
argValue
The actual argument that was bad.
Object
expectedType
The expected parameter type (a Type or TypeValue), or a string name/description.
int
number
Number of the argument, 1-origin.
Procedure
proc
The Procedure that threw the exception (if non-null).
String
procname
Name of Procedure that threw the exception (if non-null).

Constructor Summary

WrongType(ClassCastException ex, String procname, int n, Object argValue)
WrongType(ClassCastException ex, Procedure proc, int n, Object argValue)
WrongType(String procname, int n, ClassCastException ex)
WrongType(String procName, int n, Object argValue, String expectedType)
WrongType(String name, int n, String u)
WrongType(Procedure proc, int n, ClassCastException ex)
WrongType(Procedure proc, int n, Object argValue)
WrongType(Procedure proc, int n, Object argValue, String expectedType)
WrongType(Procedure proc, int n, Object argValue, Type expectedType)

Method Summary

String
getMessage()
static WrongType
make(ClassCastException ex, String procname, int n)
Deprecated.
static WrongType
make(ClassCastException ex, String procname, int n, Object argValue)
This interface is designed for a compact call sequence.
static WrongType
make(ClassCastException ex, Procedure proc, int n)
Deprecated.
static WrongType
make(ClassCastException ex, Procedure proc, int n, Object argValue)
This interface is designed for a compact call sequence.

Methods inherited from class gnu.mapping.WrappedException

getException, toString, wrapIfNeeded

Field Details

ARG_CAST

public static final int ARG_CAST
number==ARG_CAST means a general cast.
Field Value:
-4

ARG_DESCRIPTION

public static final int ARG_DESCRIPTION
number==ARG_DESCRIPTION means not a call, procname describes the target. (deprecated/unused)
Field Value:
-3

ARG_UNKNOWN

public static final int ARG_UNKNOWN
number==ARG_UNKNOWN means unknown argument number.
Field Value:
-1

ARG_VARNAME

public static final int ARG_VARNAME
number==ARG_VARNAME means not a call, procname is a variable name.
Field Value:
-2

argValue

public Object argValue
The actual argument that was bad.

expectedType

public Object expectedType
The expected parameter type (a Type or TypeValue), or a string name/description.

number

public int number
Number of the argument, 1-origin.
Can be an integer >= 1, or one of the values ARG_UNKNOWN, ARG_VARNAME, or ARG_DESCRIPTION.

proc

public Procedure proc
The Procedure that threw the exception (if non-null).

procname

public String procname
Name of Procedure that threw the exception (if non-null).

Constructor Details

WrongType

public WrongType(ClassCastException ex,
                 String procname,
                 int n,
                 Object argValue)

WrongType

public WrongType(ClassCastException ex,
                 Procedure proc,
                 int n,
                 Object argValue)

WrongType

public WrongType(String procname,
                 int n,
                 ClassCastException ex)

WrongType

public WrongType(String procName,
                 int n,
                 Object argValue,
                 String expectedType)

WrongType

public WrongType(String name,
                 int n,
                 String u)

WrongType

public WrongType(Procedure proc,
                 int n,
                 ClassCastException ex)

WrongType

public WrongType(Procedure proc,
                 int n,
                 Object argValue)

WrongType

public WrongType(Procedure proc,
                 int n,
                 Object argValue,
                 String expectedType)

WrongType

public WrongType(Procedure proc,
                 int n,
                 Object argValue,
                 Type expectedType)

Method Details

getMessage

public String getMessage()

make

public static WrongType make(ClassCastException ex,
                             String procname,
                             int n)

Deprecated.


make

public static WrongType make(ClassCastException ex,
                             String procname,
                             int n,
                             Object argValue)
This interface is designed for a compact call sequence.

make

public static WrongType make(ClassCastException ex,
                             Procedure proc,
                             int n)

Deprecated.


make

public static WrongType make(ClassCastException ex,
                             Procedure proc,
                             int n,
                             Object argValue)
This interface is designed for a compact call sequence.