001package Torello.HTML.NodeSearch; 002 003/** 004 * Indicates that an HTML segment, or a single HTML-Tag, was not found at a particular location 005 * on an HTML Page-<CODE>Vector</CODE> where that piece of HTML was expected. 006 * 007 * <BR /><BR />One of the more difficult issues that can happen when writing HTML Methods that 008 * parse and search for sections and elements that are not actually present on the page or sub-page 009 * being searched. If a section of HTML does not contain an element that a programmer expects it 010 * to contain, any search method that returns a {@code DotPair} would return 'null'. 011 * 012 * <BR /><BR />Rather than allowing a method to throw an unintended {@code NullPointerException} 013 * just because the <B>'Find'</B> returned a null reference - <I>it is better to check the result 014 * of a search, and if the section was not found to throw an {@code HTMLNotFoundException}.</I> 015 */ 016public class HTMLNotFoundException extends RuntimeException 017{ 018 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUIDEX> */ 019 public static final long serialVersionUID = 1; 020 021 /** Constructs an {@code HTMLNotFoundException} with no detail message. */ 022 public HTMLNotFoundException() 023 { super(); } 024 025 /** 026 * Constructs an {@code HTMLNotFoundException} with the specified detail message. 027 * @param message the detail message. 028 */ 029 public HTMLNotFoundException(String message) 030 { super(message); } 031 032 /** 033 * Constructs a new exception with the specified detail message and cause. 034 * 035 * <BR /><BR /><B CLASS=JDDescLabel>NOTE:</B> 036 * 037 * <BR /><BR />The detail message associated with cause is not automatically incorporated into 038 * this exception's detail message. 039 * 040 * @param message The detail message (which is saved for later retrieval by the 041 * {@code Throwable.getMessage()} method). 042 * 043 * @param cause the cause (which is saved for later retrieval by the 044 * {@code Throwable.getCause()} method). (A null value is permitted, and indicates that the 045 * cause is nonexistent or unknown.) 046 */ 047 public HTMLNotFoundException(String message, Throwable cause) 048 { super(message, cause); } 049 050 /** 051 * Constructs a new exception with the specified cause and a detail message of 052 * {@code (cause==null ? null : cause.toString())} (which typically contains the class and 053 * detail message of cause). This constructor is useful for exceptions that are little more 054 * than wrappers for other throwables. 055 * 056 * @param cause The cause (which is saved for later retrieval by the 057 * {@code Throwable.getCause()} method). (A null value is permitted, and indicates that the 058 * cause is nonexistent or unknown.) 059 */ 060 public HTMLNotFoundException(Throwable cause) 061 { super(cause); } 062}