Add message to exception.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1546206 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Thomas Neidhart 2013-11-27 21:50:47 +00:00
parent 393fa5df92
commit 59899e1c82
1 changed files with 1 additions and 1 deletions

View File

@ -151,7 +151,7 @@ public class PeekingIterator<E> implements Iterator<E> {
*/
public void remove() {
if (slotFilled) {
throw new IllegalStateException();
throw new IllegalStateException("peek() or element() called before remove()");
}
iterator.remove();
}