|
Boost Users : |
From: Ovanes Markarian (om_boost_at_[hidden])
Date: 2008-02-28 13:29:08
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
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net