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 be out of order. 008 * 009 * <EMBED CLASS='external-html' DATA-FILE-ID=REX_METHOD_LOC_NOTE> 010 */ 011public class ReplaceablesUnsortedException 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 /** 026 * <EMBED CLASS='external-html' DATA-FILE-ID=EXPF> 027 * 028 * A reference to the <B STYLE='color: red'>second</B> {@link Replaceable} which caused this 029 * exception to throw 030 */ 031 public final Replaceable r2; 032 033 /** 034 * Constructs a {@code ReplaceablesUnsortedException} with no detail message. 035 * 036 * @param r1 A reference to the <B STYLE='color: red'>first</B> {@link Replaceable} which caused 037 * this exception to throw 038 * 039 * <EMBED CLASS='external-html' DATA-FILE-ID=EXPF_PARAM> 040 * 041 * @param r2 A reference to the <B STYLE='color: red'>second</B> {@link Replaceable} which caused 042 * this exception to throw 043 * 044 * <EMBED CLASS='external-html' DATA-FILE-ID=EXPF_PARAM> 045 */ 046 public ReplaceablesUnsortedException(Replaceable r1, Replaceable r2) 047 { 048 super(); 049 050 if (r1 == null) throw new ExceptionCheckError 051 ("Parameter 'r1' was passed a null reference"); 052 053 if (r2 == null) throw new ExceptionCheckError 054 ("Parameter 'r2' was passed a null reference"); 055 056 this.r1 = r1; 057 this.r2 = r2; 058 } 059 060 /** 061 * Constructs a {@code ReplaceablesUnsortedException} with the specified detail message. 062 * 063 * @param message the detail message. 064 * 065 * @param r1 A reference to the <B STYLE='color: red'>first</B> {@link Replaceable} which caused 066 * this exception to throw 067 * 068 * <EMBED CLASS='external-html' DATA-FILE-ID=EXPF_PARAM> 069 * 070 * @param r2 A reference to the <B STYLE='color: red'>second</B> {@link Replaceable} which caused 071 * this exception to throw 072 * 073 * <EMBED CLASS='external-html' DATA-FILE-ID=EXPF_PARAM> 074 */ 075 public ReplaceablesUnsortedException(String message, Replaceable r1, Replaceable r2) 076 { 077 super(message); 078 079 if (r1 == null) throw new ExceptionCheckError 080 ("Parameter 'r1' was passed a null reference"); 081 082 if (r2 == null) throw new ExceptionCheckError 083 ("Parameter 'r2' was passed a null reference"); 084 085 this.r1 = r1; 086 this.r2 = r2; 087 } 088}