001package Torello.HTML; 002 003import Torello.Java.ExceptionCheckError; 004 005/** 006 * Thrown during a {@link Replaceable} HTML-{@code Vector} update operation when two consecutive 007 * {@link Replaceable} instances appear to point to overlapping indices within the {@code Vector}. 008 * 009 * <EMBED CLASS='external-html' DATA-FILE-ID=REX_METHOD_LOC_NOTE> 010 */ 011public class ReplaceablesOverlappingException extends ReplaceableException 012{ 013 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUIDEX> */ 014 public static final long serialVersionUID = 1; 015 016 /** 017 * <EMBED CLASS='external-html' DATA-FILE-ID=EXPF> 018 * 019 * A reference to the <B STYLE='color: red'>first</B> {@link Replaceable} which caused this 020 * exception to throw 021 */ 022 public final Replaceable r1; 023 024 /** 025 * <EMBED CLASS='external-html' DATA-FILE-ID=EXPF> 026 * 027 * A reference to the <B STYLE='color: red'>second</B> {@link Replaceable} which caused this 028 * exception to throw 029 */ 030 public final Replaceable r2; 031 032 /** 033 * Constructs a {@code ReplaceablesOverlappingException} with no detail message. 034 * 035 * @param r1 A reference to the <B STYLE='color: red'>first</B> {@link Replaceable} which caused 036 * this exception to throw 037 * 038 * <EMBED CLASS='external-html' DATA-FILE-ID=EXPF_PARAM> 039 * 040 * @param r2 A reference to the <B STYLE='color: red'>second</B> {@link Replaceable} which caused 041 * this exception to throw 042 * 043 * <EMBED CLASS='external-html' DATA-FILE-ID=EXPF_PARAM> 044 */ 045 public ReplaceablesOverlappingException(Replaceable r1, Replaceable r2) 046 { 047 super(); 048 049 if (r1 == null) throw new ExceptionCheckError 050 ("Parameter 'r1' was passed a null reference"); 051 052 if (r2 == null) throw new ExceptionCheckError 053 ("Parameter 'r2' was passed a null reference"); 054 055 this.r1 = r1; 056 this.r2 = r2; 057 } 058 059 /** 060 * Constructs a {@code ReplaceablesOverlappingException} with the specified detail message. 061 * 062 * @param message the detail message. 063 * 064 * @param r1 A reference to the <B STYLE='color: red'>first</B> {@link Replaceable} which caused 065 * this exception to throw 066 * 067 * <EMBED CLASS='external-html' DATA-FILE-ID=EXPF_PARAM> 068 * 069 * @param r2 A reference to the <B STYLE='color: red'>second</B> {@link Replaceable} which caused 070 * this exception to throw 071 * 072 * <EMBED CLASS='external-html' DATA-FILE-ID=EXPF_PARAM> 073 */ 074 public ReplaceablesOverlappingException(String message, Replaceable r1, Replaceable r2) 075 { 076 super(message); 077 078 if (r1 == null) throw new ExceptionCheckError 079 ("Parameter 'r1' was passed a null reference"); 080 081 if (r2 == null) throw new ExceptionCheckError 082 ("Parameter 'r2' was passed a null reference"); 083 084 this.r1 = r1; 085 this.r2 = r2; 086 } 087} 088