gate.util
Class LuckyException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--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

Field Summary
private static boolean DEBUG
          Debug flag
(package private) static String defaultMessage
          The default message carried by this type of exceptions
 
Fields inherited from class java.lang.RuntimeException
 
Fields inherited from class java.lang.Throwable
 
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.
 
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
 

Field Detail

DEBUG

private static final boolean DEBUG
Debug flag

See Also:
Constant Field Values

defaultMessage

static String defaultMessage
The default message carried by this type of exceptions

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