codesimian
Class CountPException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
codesimian.CountPException
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- CountPException.TooBig, CountPException.TooBig.CouldNotAdd, CountPException.TooSmall, CountPException.TooSmall.CouldNotDelete
public class CountPException
- extends java.lang.RuntimeException
Means some CS's countP() is not in a
valid range (between minP() and maxP() inclusive).
Obviously countP() must start at 0, but when compiling is done, it should be in the valid range.
Throw a new CountPException() when someCS.countP() < someCS.minP() OR someCS.maxP() < someCS.countP().
A CS is not required to throw a CountPException if it can ignore the error,
but if you must throw something, throw a subclass of CountPException.
- See Also:
- Serialized Form
Field Summary |
int |
badCountP
the countP() when this Exception occured |
CS |
cs
the CS whose countP() is out of valid range |
java.lang.String |
message
|
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 |
badCountP
public final int badCountP
- the countP() when this Exception occured
cs
public final CS cs
- the CS whose countP() is out of valid range
message
public final java.lang.String message
CountPException
public CountPException()
CountPException
public CountPException(java.lang.String message)
CountPException
public CountPException(CS myCountPIsOutOfRange)
CountPException
public CountPException(CS myCountPIsOutOfRange,
java.lang.String message)
getMessage
public java.lang.String getMessage()
- Overrides:
getMessage
in class java.lang.Throwable