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 a programmer is expecting an HTML-Page {@code Vector} position-index to contain a * {@code TagNode} whose <CODE>TagNode.isClosing</CODE> field to be set to {@code TRUE} and it * is not, then this exception should be thrown. * * <BR /><BR /><B CLASS=JDDescLabel>NOTE:</B> * * <BR />This {@code Exception} differs from the similarly-named {@link ClosingTagNodeException}, * in that, here the programmer is specifying that the error which has occured is that the user * expected to find a <B>'closing version'</B> of a {@link TagNode} - one where it's * {@link TagNode#isClosing isClosing} field had been set to {@code FALSE}. * * <BR /><BR />In {@code ClosingTagNodeException}, the user has attempted to perform some operation * on a {@code TagNode} element which is not permitted to be done to or by {@code TagNode's} whose * {@code 'isClosing'} field is set to {@code TRUE}. They are similar, but the origins of the * throws are quite different. In the latter, usually a user has performed a {@link TagNode} * operation on the wrong type of {@code TagNode}. */ public class ClosingTagNodeExpectedException extends TagNodeExpectedException { /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUIDEX> */ public static final long serialVersionUID = 1; /** Constructs an {@code ClosingTagNodeExpectedException} with no detail message. */ public ClosingTagNodeExpectedException() { super(); } /** * Constructs an {@code ClosingTagNodeExpectedException} with the specified detail message. * @param message the detail message. */ public ClosingTagNodeExpectedException(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 ClosingTagNodeExpectedException(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). * 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 ClosingTagNodeExpectedException(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 ClosingTagNodeExpectedException(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." ); } } |