Package Torello.HTML

Class MalformedTagNodeException

  • All Implemented Interfaces:
    java.io.Serializable

    public class MalformedTagNodeException
    extends java.lang.IllegalArgumentException
    MalformedTagNodeException - Documentation.

    If when attempting to instantiate or construct a TagNode the String used to instantiate it is invalid, this exception will be thrown informing the programmer that his passed constructor String was invalid. That string will be available as a public final String field inside this exception class.

    This class provides some public final "inspection & convenience" fields which are guaranteed not to be null when this Exception is thrown by an internal method to the HTML Node-Search package. If as a programmer, you intended to extend use of this class, make sure to pass valid-information & valid-data, to the constructors of this class.
    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
    • 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:
        1
        public static final long serialVersionUID = 1;
        
      • htmlElementStr

        public final java.lang.String htmlElementStr
        This field is provided to the user as a matter of convenience. All instantiations of this Exception are guaranteed to enforce and ensure that when an instance of this exception is thrown, the convenience field will not be null. If this package is extended, it is up to the programmer/user to make sure not to leave this field null when using one of these constructors. This constructor will not check whether a convenience field is null or not, when constructing the exception.

        IMPORTANT: All this is really trying to explain is that, when debugging your code, if in the analysis of a particular Exception, that analysis causes another exception throw (like NullPointerException) - BECAUSE THIS CONVENIENCE FIELD WAS LEFT NULL - would be an unnecessary source of headache.

        This public final field contains the String that, when a TagNode attempted to build this String into a TagNode instance, caused an exception to throw.
        Code:
        Exact Field Declaration Expression:
        1
        public final String htmlElementStr;
        
    • Constructor Detail

      • MalformedTagNodeException

        public MalformedTagNodeException​(java.lang.String message,
                                         java.lang.String htmlElementStr)
        Constructs a new exception with the specified detail message, and one public, final parameter: htmlElementStr.
        Parameters:
        message - the detail message.
        htmlElementStr - This will be passed the constructor-string that was passed to the constructor which caused this Exception to throw in the first place. This String will be available in the public final String htmlElementStr field, for inspection and reference. It ought not to be left null.
        See Also:
        htmlElementStr
      • MalformedTagNodeException

        public MalformedTagNodeException​(java.lang.String message,
                                         java.lang.Throwable cause,
                                         java.lang.String htmlElementStr)
        Constructs a new exception with the specified detail message, cause-chain throwable, and one public, final parameter: htmlElementStr.
        Parameters:
        message - The detail message (which is saved for later retrieval by the 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.)
        htmlElementStr - This will be passed the constructor-string that was passed to the constructor which caused this Exception to throw in the first place. This String will be available in the public final String htmlElementStr field, for inspection and reference. It ought not to be left null.
        See Also:
        htmlElementStr