com.gargoylesoftware.base.util

Class DetailedIllegalArgumentException

public class DetailedIllegalArgumentException extends IllegalArgumentException

A more detailed version of IllegalArgumentException that contains information about what argument was not legal.

Version: $Revision: 1.4 $

Author: Mike Bowler

Field Summary
StringargumentName_
ObjectargumentValue_
static longserialVersionUID
Constructor Summary
DetailedIllegalArgumentException(String argumentName, Object argumentValue, String message)
Create an instance
DetailedIllegalArgumentException(String argumentName, Object argumentValue)
Create an instance
DetailedIllegalArgumentException(String argumentName, int argumentValue, String message)
Create an instance
DetailedIllegalArgumentException(String argumentName, int argumentValue)
Create an instance
Method Summary
StringgetArgumentName()
Return the name of the argument that was illegal
ObjectgetArgumentValue()
Return the value of the argument

Field Detail

argumentName_

private final String argumentName_

argumentValue_

private final Object argumentValue_

serialVersionUID

private static final long serialVersionUID

Constructor Detail

DetailedIllegalArgumentException

public DetailedIllegalArgumentException(String argumentName, Object argumentValue, String message)
Create an instance

Parameters: argumentName The name of the argument that was illegal argumentValue The illegal value message The message to use in the exception

DetailedIllegalArgumentException

public DetailedIllegalArgumentException(String argumentName, Object argumentValue)
Create an instance

Parameters: argumentName The name of the argument that was illegal argumentValue The illegal value

DetailedIllegalArgumentException

public DetailedIllegalArgumentException(String argumentName, int argumentValue, String message)
Create an instance

Parameters: argumentName The name of the argument that was illegal argumentValue The illegal value message A message

DetailedIllegalArgumentException

public DetailedIllegalArgumentException(String argumentName, int argumentValue)
Create an instance

Parameters: argumentName The name of the argument that was illegal argumentValue The illegal value

Method Detail

getArgumentName

public String getArgumentName()
Return the name of the argument that was illegal

Returns: the name of the argument

getArgumentValue

public Object getArgumentValue()
Return the value of the argument

Returns: The value of the argument