GATE
Version 3.1-2270

gate.util
Class LuckyException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by gate.util.LuckyException
All Implemented Interfaces:
Serializable

public class LuckyException
extends RuntimeException

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.

See Also:
Serialized Form

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

LuckyException

public LuckyException()
Default constructor, creates a new execption with the default message


LuckyException

public LuckyException(String message)
Creates a new exception with the provided message prepended to the default one on a separate line.

Parameters:
message - the uses message

GATE
Version 3.1-2270