diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTNode.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTNode.java index 7159ce3ba00..a4ec4c4691e 100644 --- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTNode.java +++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTNode.java @@ -3443,10 +3443,10 @@ public final int getLength() { */ public final void setSourceRange(int startPosition, int length) { if (startPosition >= 0 && length < 0) { - throw new IllegalArgumentException(); + throw new IllegalArgumentException("negative length=" + length + " startPosition= " + startPosition); //$NON-NLS-1$ //$NON-NLS-2$ } if (startPosition < 0 && length != 0) { - throw new IllegalArgumentException(); + throw new IllegalArgumentException("negative startPosition=" + startPosition + " length=" + length); //$NON-NLS-1$ //$NON-NLS-2$ } // source positions are not considered a structural property // but we protect them nevertheless