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 long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description BalancedHTMLException()
Creates a newBalancedHTMLException
with no detail message.BalancedHTMLException(String message, Hashtable<String,Integer> unbalancedTags)
Constructs aBalancedHTMLException
with the specified detail message.BalancedHTMLException(Hashtable<String,Integer> unbalancedTags)
Constructs aBalancedHTMLException
with the specified detail message.
-
-
-
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 theSerializable
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'sjava.lang.Exception
andjava.lang.Error
classes 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 newBalancedHTMLException
with no detail message.
-
BalancedHTMLException
public BalancedHTMLException (java.util.Hashtable<java.lang.String,java.lang.Integer> unbalancedTags)
Constructs aBalancedHTMLException
with the specified detail message.- Parameters:
unbalancedTags
- This is aHashMap
that 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 aBalancedHTMLException
with the specified detail message.- Parameters:
message
- the detail message.unbalancedTags
- This is aHashMap
that 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.
-
-