Package Torello.HTML
Class BalancedHTMLException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- Torello.HTML.MalformedHTMLException
-
- Torello.HTML.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 classBalance.- See Also:
Balance, Serialized Form
Hi-Lited Source-Code:- View Here: Torello/HTML/BalancedHTMLException.java
- Open New Browser-Tab: Torello/HTML/BalancedHTMLException.java
File Size: 3,087 Bytes Line Count: 67 '\n' Characters Found
-
-
Field Summary
Serializable ID Modifier and Type Field static longserialVersionUID
-
Constructor Summary
Constructors Constructor BalancedHTMLException()BalancedHTMLException(String message, Hashtable<String,Integer> unbalancedTags)BalancedHTMLException(Hashtable<String,Integer> unbalancedTags)
-
-
-
Field Detail
-
serialVersionUID
public static final long serialVersionUID
This fulfils the SerialVersion UID requirement for all classes that implement Java'sinterface java.io.Serializable. Using theSerializableImplementation 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'sjava.lang.Exceptionandjava.lang.Errorclasses implement theSerializable 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()
Creates a newBalancedHTMLExceptionwith no detail message.
-
BalancedHTMLException
public BalancedHTMLException (java.util.Hashtable<java.lang.String,java.lang.Integer> unbalancedTags)
Constructs aBalancedHTMLExceptionwith the specified detail message.- Parameters:
unbalancedTags- This is aHashMapthat should have been generated byBalance.check(Vector)andBalance.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 aNullPointerException! 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 aBalancedHTMLExceptionwith the specified detail message.- Parameters:
message- the detail message.unbalancedTags- This is aHashMapthat should have been generated byBalance.check(Vector)andBalance.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 aNullPointerException! If this table is empty, the detail message will look bizarre.
-
-