
Hi everyone Be it that this code is working: try { throw InterfaceTimeoutException(); } catch (const std::exception &ex) { cout << ex.what() << endl; } However, trying this: try { lambda::throw_exception(constructor<InterfaceTimeoutException> ())(); } catch (const std::exception &ex) { cout << ex.what() << endl; } ends up with my programm crashing (Exit code 3). What am I missing here? Thanks for any reply and best regards Pascal -- View this message in context: http://www.nabble.com/lambda%3A%3Athrow_exception-fails-tp24063172p24063172.... Sent from the Boost - Users mailing list archive at Nabble.com.

AMDG KessiMC wrote:
Be it that this code is working:
try { throw InterfaceTimeoutException(); } catch (const std::exception &ex) { cout << ex.what() << endl; }
However, trying this:
try { lambda::throw_exception(constructor<InterfaceTimeoutException> ())(); } catch (const std::exception &ex) { cout << ex.what() << endl; }
ends up with my programm crashing (Exit code 3).
What am I missing here?
constructor must be used with bind. lambda::throw_exception(lambda::bind( lambda::constructor<InterfaceTimeoutException>()))(); In Christ, Steven Watanabe
participants (2)
-
KessiMC
-
Steven Watanabe