Package Torello.HTML

Class BalancedHTMLException

  • All Implemented Interfaces:
    java.io.Serializable

    public class BalancedHTMLException
    extends MalformedHTMLException
    Used to report unbalanced HTML Tags within any Vectorized-HTML page or sub-page.

    HTML that is 'balanced' is HTML that (for each and every non-singleton / non-self-closing tag) has an equal number of opening and closing elements. As an example, if within an HTML page or snippet, there exists an unclosed <DIV> element, the balance-reporter might show four <DIV>'s, but only three </DIV>'s. This would report a 'DIV' count of '+1'.

    Read more about this variant of validity-checking in class Balance.
    See Also:
    Balance, Serialized Form


    • Field Summary

       
      Serializable ID
      Modifier and Type Field
      static long serialVersionUID
    • 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

      • BalancedHTMLException

        🡅  🡇    
        public BalancedHTMLException​
                    (java.util.Hashtable<java.lang.String,​java.lang.Integer> unbalancedTags)
        
        Constructs a BalancedHTMLException with the specified detail message.
        Parameters:
        unbalancedTags - This is a HashMap that should have been generated by Balance.check(Vector) and Balance.checkNonZero(Hashtable). This table is printed into this exception's error detail message.

        IMPORTANT: If this parameter is left null, this exception's constructor will throw a NullPointerException! If this table is empty, the detail message will look bizarre.
      • BalancedHTMLException

        🡅    
        public BalancedHTMLException​
                    (java.lang.String message,
                     java.util.Hashtable<java.lang.String,​java.lang.Integer> unbalancedTags)
        
        Constructs a BalancedHTMLException with the specified detail message.
        Parameters:
        message - the detail message.
        unbalancedTags - This is a HashMap that should have been generated by Balance.check(Vector) and Balance.checkNonZero(Hashtable). This table is printed into this exception's error detail message.

        IMPORTANT: If this parameter is left null, this exception's constructor will throw a NullPointerException! If this table is empty, the detail message will look bizarre.