Thread: [asio-users] asio::error and std::exception
Brought to you by:
chris_kohlhoff
From: Arvid N. <c9...@cs...> - 2005-12-02 12:47:19
|
I have a few comments/questions. I think asio::error should derive from std::exception and implement a what() member function. Right now I can't find any way to convert an error code into a descriptive string, and I think a what() function would be a good candidate for doing that. What's the rationale behind having basic_stream_socket::get_remote_endpoint() not return an endpoint, but take a reference to one? It makes it much more cumbersome to use because I have to have named temporaries. If there's a good reason, I think it should be stated in the documentation. I also think it should just be called remote_endpoint(). Personally, I also consider the headers-only to be a show-stopper for boost acceptance. I think this should be fixed, preferably before the review start. -- Arvid Norberg |
From: Christopher K. <ch...@ko...> - 2005-12-10 21:58:30
|
Hi Arvid, Following up on my earlier (off-list) reply... --- Arvid Norberg <c9...@cs...> wrote: > I have a few comments/questions. > I think asio::error should derive from std::exception and > implement a what() member function. Right now I can't find > any way to convert an error code into a descriptive string, > and I think a what() function would be a good candidate for > doing that. For 0.3.6 I've changed asio::error::what() to return the string associated with the error, and also changed the doxygen options to make it clear that asio::error inherits from std::exception. Cheers, Chris |