001package Torello.HTML;
002
003import Torello.Java.ExceptionCheckError;
004
005/**
006 * Thrown during a {@link Replaceable} HTML-{@code Vector} update operation when a
007 * {@link Replaceable} instance is not within the bounds of that HTML-{@code Vector}.
008 * 
009 * <EMBED CLASS='external-html' DATA-FILE-ID=REX_METHOD_LOC_NOTE>
010 */
011public class ReplaceableOutOfBoundsException 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 {@link Replaceable} which caused this exception to throw
020     */
021    public final Replaceable r;
022
023    /**
024     * Constructs a {@code ReplaceableOutOfBoundsException} with no detail message.
025     * 
026     * @param r A reference to the {@link Replaceable} which caused this exception to throw 
027     * 
028     * <EMBED CLASS='external-html' DATA-FILE-ID=EXPF_PARAM>
029     */
030    public ReplaceableOutOfBoundsException(Replaceable r)
031    {
032        super();
033
034        if (r == null) throw new ExceptionCheckError
035            ("Parameter 'r' was passed a null reference");
036
037        this.r = r;
038    }
039
040    /**
041     * Constructs a {@code ReplaceableOutOfBoundsException} with the specified detail message.
042     * 
043     * @param message the detail message.
044     * 
045     * @param r A reference to the {@link Replaceable} which caused this exception to throw 
046     * 
047     * <EMBED CLASS='external-html' DATA-FILE-ID=EXPF_PARAM>
048     */
049    public ReplaceableOutOfBoundsException(String message, Replaceable r)
050    {
051        super(message);
052
053        if (r == null) throw new ExceptionCheckError
054            ("Parameter 'r' was passed a null reference");
055
056        this.r = r;
057    }
058}