|
|
|
|
|
by iam
4422 days ago
|
|
This definitely dampens the usefulness. It's like the author knew it was a bad idea too (he put noexcept(false) on the destructor; without which in C++11 the program terminates immediately when an exception is thrown from destructor). If there's some way to avoid terminating when there's a double exception in the destructor, that would be good to hear! One simple way I can think of is to reuse the same variable instead. ThrowOnError throw_on_error;
std::cout << libfoo_create_widgets(1, &c1, throw_on_error) << libfoo_create_widgets(2, &c2, throw_on_error);
|
|