diff --git a/jaraco/itertools.py b/jaraco/itertools.py
index <HASH>..<HASH> 100644
--- a/jaraco/itertools.py
+++ b/jaraco/itertools.py
@@ -711,9 +711,12 @@ def takewhile_peek(predicate, iterable):
 	[4]
 	"""
 	while True:
-		if not predicate(iterable.peek()):
+		try:
+			if not predicate(iterable.peek()):
+				break
+			yield next(iterable)
+		except StopIteration:
 			break
-		yield next(iterable)
 
 
 def first(iterable, *args):
Fix error about StopIteration raised in generator.