com.meyling.principia.argument
Class ArgumentException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--com.meyling.principia.argument.ArgumentException
All Implemented Interfaces:
Serializable

public class ArgumentException
extends Exception

This is a construction (and checking) exception for arguments.

Version:
$Revision 0.00.50$
Author:
Michael Meyling
See Also:
Serialized Form

Field Summary
private  Argument argument
          problem with this argument
private  boolean begin
          occured problem at beginning of argument?
private  int code
          exception code
private  String description
          description of reason for exception
private  Argument secundaryArgument
          problem is illustrated with this secondary argument
 
Fields inherited from class java.lang.Throwable
backtrace, detailMessage, serialVersionUID
 
Constructor Summary
ArgumentException(int code, String description)
          Constructs an argument exception.
ArgumentException(int code, String description, Argument argument)
          Constructs an argument exception.
ArgumentException(int code, String description, Argument argument, Argument secundaryArgument)
          Constructs an argument exception.
ArgumentException(int code, String description, Argument argument, boolean begin)
          Constructs an argument exception.
 
Method Summary
 Argument getArgument()
          Get problematic argument.
 int getCode()
          Get exception code.
 String getDescription()
          Get exception code.
 Argument getSecondaryArgument()
          Get secundary argument.
 boolean isBegin()
          Problem at begin of argument?
 void setArgument(Argument argument)
          Set the problematic argument.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, printStackTrace0, toString
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

code

private final int code
exception code

description

private final String description
description of reason for exception

argument

private Argument argument
problem with this argument

secundaryArgument

private final Argument secundaryArgument
problem is illustrated with this secondary argument

begin

private boolean begin
occured problem at beginning of argument?
Constructor Detail

ArgumentException

public ArgumentException(int code,
                         String description)
Constructs an argument exception.
Parameters:
code - exception cathegory
description - what is the problem

ArgumentException

public ArgumentException(int code,
                         String description,
                         Argument argument)
Constructs an argument exception.
Parameters:
code - exception cathegory
description - what is the problem
argument - this lead to problems

ArgumentException

public ArgumentException(int code,
                         String description,
                         Argument argument,
                         Argument secundaryArgument)
Constructs an argument exception.
Parameters:
code - exception cathegory
description - what is the problem
argument - this lead to problems
secundaryArgument - this argument illustrates the problem

ArgumentException

public ArgumentException(int code,
                         String description,
                         Argument argument,
                         boolean begin)
Constructs an argument exception.
Parameters:
code - exception cathegory
description - what is the problem
argument - this lead to problems (or after it)
begin - was the problem at the begining of argument?
Method Detail

getCode

public final int getCode()
Get exception code.
Returns:
exception code

getDescription

public final String getDescription()
Get exception code.
Returns:
exception description

getArgument

public final Argument getArgument()
Get problematic argument.
Returns:
argument that lead to problems (or last ok argument) maybe null

setArgument

public final void setArgument(Argument argument)
Set the problematic argument.
Parameters:
argument - that lead to problems (or last ok argument)

getSecondaryArgument

public final Argument getSecondaryArgument()
Get secundary argument.
Returns:
argument that illustrates the problem maybe null

isBegin

public final boolean isBegin()
Problem at begin of argument?
Returns:
did argument lead to problems?