$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] lambda::throw_exception fails
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-06-16 18:39:04
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