
22 Jun
2012
22 Jun
'12
6:17 p.m.
Fabio Fracassi wrote:
Yes it is, because in reality boost exception solves problems for the users of any library that uses it. When using boost exception I can safely let exceptions escape threads and have them rethrown in the starting thread, for instance.
I would be interested to learn how you do this. With open-mp (and mpi), my current way to add exception handling code really adds much noise: bool cancel = false; #pragma omp parallel shared(cancel) { try { ... the real code } catch (std::exception& r) { cancel = true; store_exception(r); } } if (cancel) { rethrow_exception(); } Regards, Thomas