I can see that you already got an answer, but building on what you already have, you could yield back an object indicating the error status, and use that for checking in your loop.
Before using this style though, you should really consider if hiding the error handling/logging in this kind of structure is really something you want to do, being "Pythonic" is usually leaning more towards being explicit instead of hiding the details.
from contextlib import contextmanager
@contextmanager
def error_handler():
error = True
try:
class Internal:
def caughtError(self): return error
yield Internal()
except Exception as e:
print("Logging#1")
except BaseException as e:
print("Logging#2")
else:
error = False
with error_handler() as e:
print("here")
# raise Exception("hopp")
print(e.caughtError()) # True if an error was logged, False otherwise