danvratil / qcoro

C++ Coroutines for Qt
https://qcoro.dvratil.cz
MIT License
331 stars 53 forks source link

Fix and clarify exception handling in generators #105

Closed danvratil closed 2 years ago

danvratil commented 2 years ago

Both sync and async generators now behave the same way. If the generator coroutine throws an exception, it is rethrown either from generator's begin() method, or when incrementing the generator iterator.

Afterwards both the iterator and the generator are considered invalid and may not be used anymore.