Package Torello.HTML
Class MalformedTagNodeException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- java.lang.IllegalArgumentException
-
- Torello.HTML.MalformedTagNodeException
-
- All Implemented Interfaces:
java.io.Serializable
public class MalformedTagNodeException extends java.lang.IllegalArgumentException
If, when attempting to instantiate or construct aTagNode, theStringused to instantiate that node is invalid, this exception will be thrown to inform the programmer that his passed constructor-Stringwas invalid. That failed-Stringwill be available as apublic final Stringfield inside this exception class.
This class provides somepublic final"inspection & convenience" fields which should guarantee to avoid havingnullvalues when thisExceptionis thrown by an internal method. 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
Hi-Lited Source-Code:- View Here: Torello/HTML/MalformedTagNodeException.java
- Open New Browser-Tab: Torello/HTML/MalformedTagNodeException.java
File Size: 3,540 Bytes Line Count: 84 '\n' Characters Found
-
-
Field Summary
Fields Modifier and Type Field StringhtmlElementStrstatic longserialVersionUID
-
Constructor Summary
Constructors Constructor MalformedTagNodeException(String message, String htmlElementStr)MalformedTagNodeException(String message, Throwable cause, String htmlElementStr)
-
-
-
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;
-
htmlElementStr
public final java.lang.String htmlElementStr
This field is provided to the user as a matter of convenience. All instances of thisExceptionought to guarantee that when an instance is thrown - any & all "Convenience Fields" have been properly set.
If this package is extended, or if this exception is used elsewhere, try to remember to not to accidentally leave this field null when using this class' constructors.
In Summary:
All this is really trying to explain is that, when debugging your code, if in the analysis of a particularException, that analysis causes another exception throw (NullPointerException) - BECAUSE THIS CONVENIENCE FIELD WAS LEFT NULL - you would likely get pretty angry.
This public final field contains theStringthat, when aTagNodeattempted to build thisStringinto aTagNodeinstance, caused an exception to throw.- Code:
- Exact Field Declaration Expression:
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 onepublic, finalparameter:htmlElementStr.- Parameters:
message- the detail message.htmlElementStr- This will be passed the constructor-string that was passed to the constructor which caused thisExceptionto throw in the first place. ThisStringwill be available in thepublic final String htmlElementStrfield, for inspection and reference. It ought not to be left null.
This parameter should not be left null. If it were accidentally left null, this could force exception-handling code to to throw an exception itself - while checking exceptions! Note that checking the input to this constructor does occur, and if this parameter is passed a null value, an instance ofTorello.Java.ExceptionCheckErrorwill throw.- 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 onepublic, finalparameter:htmlElementStr.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 theThrowable.getMessage()method).cause- the cause (which is saved for later retrieval by theThrowable.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 thisExceptionto throw in the first place. ThisStringwill be available in thepublic final String htmlElementStrfield, for inspection and reference. It ought not to be left null.
This parameter should not be left null. If it were accidentally left null, this could force exception-handling code to to throw an exception itself - while checking exceptions! Note that checking the input to this constructor does occur, and if this parameter is passed a null value, an instance ofTorello.Java.ExceptionCheckErrorwill throw.- See Also:
htmlElementStr
-
-