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 | package Torello.HTML; import Torello.Java.ExceptionCheckError; /** * If, when attempting to instantiate or construct a {@code TagNode}, the {@code String} used to * instantiate that node is invalid, this exception will be thrown to inform the programmer that * his passed constructor-{@code String} was invalid. That failed-{@code String} will be available * as a {@code public final String} field inside this exception class. * * <BR /><BR /><EMBED CLASS='external-html' DATA-FILE-ID=EXPM> */ public class MalformedTagNodeException extends IllegalArgumentException { /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUIDEX> */ public static final long serialVersionUID = 1; /** * <EMBED CLASS='external-html' DATA-FILE-ID=EXPF> * * <BR /><BR />This public final field contains the {@code String} that, when a {@code TagNode} * attempted to build this {@code String} into a {@code TagNode} instance, caused an exception * to throw. */ public final String htmlElementStr; /** * Constructs a new exception with the specified detail message, and one {@code public, final} * parameter: {@code htmlElementStr}. * * @param message the detail message. * * @param htmlElementStr This will be passed the constructor-string that was passed to the * constructor which caused this {@code Exception} to throw in the first place. This * {@code String} will be available in the {@code public final String htmlElementStr} field, * for inspection and reference. <I><B>It ought not to be left null.</B></I> * * <EMBED CLASS='external-html' DATA-FILE-ID=EXPF_PARAM> * @see #htmlElementStr */ public MalformedTagNodeException(String message, String htmlElementStr) { super(message); if (htmlElementStr == null) throw new ExceptionCheckError ("'htmlElementStr' was passed a null reference"); this.htmlElementStr = htmlElementStr; } /** * Constructs a new exception with the specified detail message, cause-chain throwable, and one * {@code public, final} parameter: {@code htmlElementStr}. * * @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.) * * @param htmlElementStr This will be passed the constructor-string that was passed to the * constructor which caused this {@code Exception} to throw in the first place. This * {@code String} will be available in the {@code public final String htmlElementStr} field, * for inspection and reference. <I><B>It ought not to be left null.</B></I> * * <EMBED CLASS='external-html' DATA-FILE-ID=EXPF_PARAM> * * @see #htmlElementStr */ public MalformedTagNodeException(String message, Throwable cause, String htmlElementStr) { super(message, cause); if (htmlElementStr == null) throw new ExceptionCheckError ("'htmlElementStr' was passed a null reference"); this.htmlElementStr = htmlElementStr; } } |