Mercurial > projects > dwt-addons
diff dwtx/jface/internal/text/revisions/LineIndexOutOfBoundsException.d @ 129:eb30df5ca28b
Added JFace Text sources
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sat, 23 Aug 2008 19:10:48 +0200 |
parents | |
children | c4fb132a086c |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dwtx/jface/internal/text/revisions/LineIndexOutOfBoundsException.d Sat Aug 23 19:10:48 2008 +0200 @@ -0,0 +1,52 @@ +/******************************************************************************* + * Copyright (c) 2005, 2006 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + * Port to the D programming language: + * Frank Benoit <benoit@tionex.de> + *******************************************************************************/ +module dwtx.jface.internal.text.revisions.LineIndexOutOfBoundsException; + +import dwt.dwthelper.utils; + +/** + * Thrown to indicate that an attempt to create or modify a {@link Range} failed because it would + * have resulted in an illegal range. A range is illegal if its length is <= 0 or if its start + * line is < 0. + * + * @since 3.2 + */ +public final class LineIndexOutOfBoundsException : IndexOutOfBoundsException { + private static final long serialVersionUID= 1L; + + /** + * Constructs an <code>LineIndexOutOfBoundsException</code> with no detail message. + */ + public LineIndexOutOfBoundsException() { + super(); + } + + /** + * Constructs an <code>LineIndexOutOfBoundsException</code> with the specified detail message. + * + * @param s the detail message. + */ + public LineIndexOutOfBoundsException(String s) { + super(s); + } + + /** + * Constructs a new <code>LineIndexOutOfBoundsException</code> + * object with an argument indicating the illegal index. + * + * @param index the illegal index. + */ + public LineIndexOutOfBoundsException(int index) { + super("Line index out of range: " + index); //$NON-NLS-1$ + } +}