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
, theString
used to instantiate that node is invalid, this exception will be thrown to inform the programmer that his passed constructor-String
was invalid. That failed-String
will be available as apublic final String
field inside this exception class.
This class provides somepublic final
"inspection & convenience" fields which should guarantee to avoid havingnull
values when thisException
is 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,321 Bytes Line Count: 79 '\n' Characters Found
-
-
Field Summary
Fields Modifier and Type Field String
htmlElementStr
static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description MalformedTagNodeException(String message, String htmlElementStr)
Constructs a new exception with the specified detail message, and onepublic, final
parameter:htmlElementStr
.MalformedTagNodeException(String message, Throwable cause, String htmlElementStr)
Constructs a new exception with the specified detail message, cause-chain throwable, and onepublic, final
parameter: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 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;
-
htmlElementStr
public final java.lang.String htmlElementStr
This field is provided to the user as a matter of convenience. All instances of thisException
ought 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 theString
that, when aTagNode
attempted to build thisString
into aTagNode
instance, caused an exception to throw.
-
-
Constructor Detail
-
MalformedTagNodeException
public MalformedTagNodeException(java.lang.String message, java.lang.String htmlElementStr)
Constructs a new exception with the specified detail message, and onepublic, final
parameter:htmlElementStr
.- Parameters:
message
- the detail message.htmlElementStr
- This will be passed the constructor-string that was passed to the constructor which caused thisException
to throw in the first place. ThisString
will be available in thepublic final String htmlElementStr
field, 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.ExceptionCheckError
will 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, final
parameter:htmlElementStr
.- 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 thisException
to throw in the first place. ThisString
will be available in thepublic final String htmlElementStr
field, 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.ExceptionCheckError
will throw.- See Also:
htmlElementStr
-
-