Class ThisShouldNeverHappenException

  • All Implemented Interfaces:
    java.io.Serializable

    public class ThisShouldNeverHappenException
    extends java.lang.IllegalStateException
    This exception is thrown in various situations which "should never happen", that is, situations in which all other execution paths should technically cover all possible alternatives, but one cannot mathematically guarantee that this is actually the case, or in which future extensions might open up new code paths not detectable by Eclipse. Throwing this exception might not be the best solution; guaranteeing that all paths are covered is always better, but sometimes that's just not possible.
    Author:
    Rene Schneider - initial API and implementation
    See Also:
    Serialized Form
    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, 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

      • ThisShouldNeverHappenException

        public ThisShouldNeverHappenException()
        The standard constructor. If you don't really need to customize the message, just use this one.
      • ThisShouldNeverHappenException

        public ThisShouldNeverHappenException​(java.lang.Throwable aTriggerException)
        The standard constructor. If you don't really need to customize the message, just use this one.
        Parameters:
        aTriggerException - the exception causing this exception
      • ThisShouldNeverHappenException

        public ThisShouldNeverHappenException​(java.lang.String aMessage)
        A constructor for a custom message.
        Parameters:
        aMessage - the message
      • ThisShouldNeverHappenException

        public ThisShouldNeverHappenException​(java.lang.String aMessage,
                                              java.lang.Throwable aTriggerException)
        A constructor for a custom message.
        Parameters:
        aMessage - the message
        aTriggerException - the exception causing this exception