Closed
Description
Using a9c69b9
#include <QCoreApplication>
#include <QCoroTask>
int main(int argc, char *argv[])
{
QCoreApplication app(argc, argv);
auto task = []() -> QCoro::Task<> {
throw std::runtime_error("error");
co_return;
}();
try {
QCoro::waitFor(task);
qInfo() << "Everything is fine";
}
catch (std::exception &e) {
qInfo() << "Something went wrong:" << e.what();
}
return 0;
}
When the exception is thrown, QCoro::waitFor
blocks forever instead of rethrowing the exception.
Metadata
Metadata
Assignees
Labels
No labels