1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | package Torello.HTML; /** * If an HTML-Page {@code Vector} index-position should contain a {@code TagNode} whose * <CODE>TagNode.isClosing</CODE> field is set {@code FALSE}, <I>but that field is * {@code TRUE},</I> then this exception should throw. * * <BR /><BR /><B CLASS=JDDescLabel>Using this Exception:</B> * * <BR />This type of situation is good to check when a method or function receives an * {@code int[]} position-{@code array} generated by one of the Node-Search Package {@code FIND} * methods. * * <BR /><BR />Usually such position integer-arrays point to lists of nodes, and guaranteeing that * <I>each node pointed-to by that array is, in fact, an Open-TagNode</I>, is usually a good check * to perform. */ public class OpeningTagNodeExpectedException extends TagNodeExpectedException { /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUIDEX> */ public static final long serialVersionUID = 1; /** Constructs an {@code OpeningTagNodeExpectedException} with no detail message. */ public OpeningTagNodeExpectedException() { super(); } /** * Constructs an {@code OpeningTagNodeExpectedException} with the specified detail message. * @param message the detail message. */ public OpeningTagNodeExpectedException(String message) { super(message); } /** * Constructs a new exception with the specified detail message and cause. * * <BR /><BR /><B CLASS=JDDescLabel>NOTE:</B> * * <BR /><BR />The detail message associated with cause is not automatically incorporated into * this exception's detail message. * * @param message The detail message (which is saved for later retrieval by the * {@code Throwable.getMessage()} method). * * @param cause the cause (which is saved for later retrieval by the * {@code Throwable.getCause()} method). (A null value is permitted, and indicates that the * cause is nonexistent or unknown.) */ public OpeningTagNodeExpectedException(String message, Throwable cause) { super(message, cause); } /** * Constructs a new exception with the specified cause and a detail message of * {@code (cause==null ? null : cause.toString())} (which typically contains the class and * detail message of cause). * * <BR /><BR />This constructor is useful for exceptions that are little more than wrappers for * other {@code Throwables.} * * @param cause The cause (which is saved for later retrieval by the * {@code Throwable.getCause()} method). (A null value is permitted, and indicates that the * cause is nonexistent or unknown.) */ public OpeningTagNodeExpectedException(Throwable cause) { super(cause); } /** * Builds a new exception with a consistently worded error message. The parameter * {@code 'pos'} is used to identify the {@code Vector} location where the error has occurred. * * @param pos This is the {@code Vector} index where an Opening HTML {@code TagNode} Element * was expected. */ public OpeningTagNodeExpectedException(int pos) { this( "The Object reference at vector location [" + pos + "] was an instance of TagNode, but " + "it's 'isClosing' field was set to TRUE. An Opening HTML Element (not a closing one) was " + "expected here." ); } } |