Class LinkingStateError

  • All Implemented Interfaces:
    java.io.Serializable

    public class LinkingStateError
    extends java.lang.Error
    This error is used in place of the common 'UnreachableError'. The code in the AST parsing routines can sometimes be suspiciously difficult to debug, when an error sets in. The first use of this Throwable is going to be in preventing a certain aspect of the PPR.CTAS() and PPR.CTAB() fields from being improperly initialized.

    In that example & usage, there is currently no way for the relevant fields, which are the 'ctas' and 'ctab' fields, to be improperly initialized. However, explaining what could go wrong is somewhat difficult, and salient ennough to let go of the commonly used 'UnreachableError', and instead dedicate this specially tailored error message instead.

    This is literally because breaking code can sometimes be completely unnoticed and invisble. Please review the class PPR to understand what can go wrong when initializing the 'ctas' and 'ctab' fields.

    Almost instantly, after using this error, I noticed other places where this throwable could be used to signify other internal errors. It is not just being used for the CTAS / CTAB issues.
    See Also:
    Serialized Form


    • Field Summary

      Fields 
      Modifier and Type Field Description
      static long serialVersionUID
    • Constructor Summary

      Constructors 
      Constructor Description
      LinkingStateError()
      Constructs an 'LinkingStateError' with no detail message.
      LinkingStateError​(String message)
      Constructs an 'LinkingStateError' with the specified detail message.
      LinkingStateError​(String message, Throwable cause)
      Constructs a new error with the specified detail 'message' and 'cause'.
      LinkingStateError​(Throwable cause)
      Constructs a new error with the specified 'cause' and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause).
    • 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
    • Field Detail

      • serialVersionUID

        🡇     🗕  🗗  🗖
        public static final long serialVersionUID
        This fulfils the SerialVersion UID requirement for all classes that implement Java's interface java.io.Serializable. Using the Serializable Implementation offered by java is very easy, and can make saving program state when debugging a lot easier. It can also be used in place of more complicated systems like "hibernate" to store data as well.

        Note that Java's java.lang.Exception and java.lang.Error classes implement the Serializable interface, and a warning-free build expects this field be defined here.
        See Also:
        Constant Field Values
        Code:
        Exact Field Declaration Expression:
         public static final long serialVersionUID = 1;
        
    • Constructor Detail

      • LinkingStateError

        🡅  🡇     🗕  🗗  🗖
        public LinkingStateError​(java.lang.String message)
        Constructs an 'LinkingStateError' with the specified detail message.
        Parameters:
        message - the detail message.
      • LinkingStateError

        🡅  🡇     🗕  🗗  🗖
        public LinkingStateError​(java.lang.String message,
                                 java.lang.Throwable cause)
        Constructs a new error with the specified detail 'message' and 'cause'.

        Note: The detail message associated with cause is not automatically incorporated into this exception's detail message.
        Parameters:
        message - The detail message (which is saved for later retrieval by th Throwable.getMessage() method).
        cause - the cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
      • LinkingStateError

        🡅     🗕  🗗  🗖
        public LinkingStateError​(java.lang.Throwable cause)
        Constructs a new error with the specified 'cause' and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause). This constructor is useful for errors that are little more than wrappers for other throwables.
        Parameters:
        cause - The cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)