[fdo-dev] Standard exceptions handling practice

Mateusz Loskot mateusz at loskot.net
Fri Sep 1 14:13:38 EDT 2006


Mateusz Loskot wrote:
> How about forwarding std::exception to FdoException hierarchy,
> for example to retrieve what() message?
> 
> void foo()
> {
>    try
>    {
>       // operation that throws exception derived
>       // from standard ex. type std::exception
>       bar();
>    }
>    catch(std::exception& ex)
>    {
>       throw FdoException::Create(
>                NlsMsgGet(XYZ_123_FAIL_BAR, "bar() failed"), ex);
-----------------------------------------------------------^^^^^^^

I know it won't work, because FdoException::create() does not take
std::exception type.
So, this is also my question.

Cheers
-- 
Mateusz Loskot
http://mateusz.loskot.net




More information about the Fdo-internals mailing list