fishPond
Class IllegalFishPositionException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by fishPond.IllegalFishPositionException
All Implemented Interfaces:
java.io.Serializable

public class IllegalFishPositionException
extends java.lang.RuntimeException

Thrown when a fish is positioned in a way that doesn't make sense (either above another fish, or over a rock.)

Author:
Fawzi Emad
See Also:
Serialized Form

Field Summary
static int FISH_OVER_ROCK
           
static int TWO_FISH_IN_ONE_PLACE
           
 
Constructor Summary
IllegalFishPositionException(int code)
           
 
Method Summary
 int getCode()
           
 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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TWO_FISH_IN_ONE_PLACE

public static final int TWO_FISH_IN_ONE_PLACE
See Also:
Constant Field Values

FISH_OVER_ROCK

public static final int FISH_OVER_ROCK
See Also:
Constant Field Values
Constructor Detail

IllegalFishPositionException

public IllegalFishPositionException(int code)
Parameters:
code - either TWO_FISH_IN_ONE_PLACE, or FISH_OVER_ROCK
Method Detail

getMessage

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

getCode

public int getCode()


Web Accessibility