Hello *,
I have a question regarding the tools BOOST_<level>_THROW:
Why is it required to specify the exception being thrown? What if I don't know which exception is thrown, but I know that it should be thrown?
My use case is:
I have a worker class which executes some functionality. I know that the functionality will throw, but I would like to test that my class will remain in the consistent state after the exception was thrown? With BOOST_<level>_THROW(class_inst.execute()) I could spare the try{}catch(...){} block and make other test assertions, but unfortunately it is not possible, due to lacking of this utility.
I would propose a throw guard into the lib, which does not produce any assertion, but swallows an exception. My intention is:
I have to develop inside of a huge framework. The functionality I am trying to execute will only work on a target hardware. Since I am inside a debugger and not going to test the the executed functionality itself, but check the state of my class I think such a tool might help.
With Kind Regards,
Ovanes