Boost logo

Boost Users :

Subject: Re: [Boost-users] [asio] Throwing an exception on timeout
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2010-01-24 14:47:44


On Sun, Jan 24, 2010 at 9:43 AM, Igor R <boost.lists_at_[hidden]> wrote:
>> const boost::function<void(const error_code &)>
>> SerialInterface::ON_TIMEOUT(if_then(_1 != error::operation_aborted,
>> throw_exception(bind(constructor<
>>         SerialInterfaceTimeoutException> ()))));
>> // ...
>> void SerialInterface::read(void *buf, size_t size)
>> throw(SerialInterfaceTimeoutException) {
>
> By the way, use exception specifications carefully:
> http://www.gotw.ca/gotw/082.htm

This advice should be more like "don't ever use exception specifications." :)

Emil Dotchevski
Reverge Studios, Inc.
http://www.revergestudios.com/reblog/index.php?n=ReCode


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