
26 Feb
2010
26 Feb
'10
5:49 p.m.
On Fri, Feb 26, 2010 at 3:54 AM, Peter Dimov <pdimov@pdimov.com> wrote:
Eric Niebler wrote:
struct regex_error : virtual std::runtime_error , virtual boost::exception
There is no need to derive virtually from runtime_error. As you say below, this serves no purpose.
The purpose it serves is that someone catching std::runtime_error won't get silent errors, even though there is still a problem with std::exception. Also the problem Eric points at is more generic, there may be other exception types that are not default-constructable. I feel that we should have a recommendation for this situation anyway. Emil Dotchevski Reverge Studios, Inc. http://www.revergestudios.com/reblog/index.php?n=ReCode