|
GATE Version 3.1-2270 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
gate.util.LuckyException
public class LuckyException
This exception is intended to be used in places where there definitely
shouldn't be any exceptions thrown but the API requires us to catch some,
eg:
try{
if( a != null){
a.doSomething();
}
}catch(NullPointerException npe){
throw new LuckyException("I found a null pointer!");
}
Of course the system will never require you to catch NullPOinterException as
it derives from RuntimeException, but I couldn't come with a better example.
Constructor Summary | |
---|---|
LuckyException()
Default constructor, creates a new execption with the default message |
|
LuckyException(String message)
Creates a new exception with the provided message prepended to the default one on a separate line. |
Method Summary |
---|
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LuckyException()
public LuckyException(String message)
message
- the uses message
|
GATE Version 3.1-2270 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |