From: Warren Young Date: July 5 2005 11:07am Subject: Re: exception hierarchy List-Archive: http://lists.mysql.com/plusplus/4590 Message-Id: <42CA69DB.6080401@etr-usa.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Chris Frey wrote: > > This would introduce > multiple inheritance into the exception hierarchy if we wanted to > keep a common mysqlpp::Exception base class, The only purpose for that class is to allow someone to catch all MySQL++ exceptions in a single catch block. In documenting this change, I've also been conflating the advantages from deriving from std::exception, which provides a consistent interface to all exceptions. So while you don't lose out on the latter with your proposal, you do make it more difficult to separate the MySQL++ exceptions from C++ library exceptions. This isn't a small concern. I know you know that MySQL++ can trigger library exceptions, such as through vector::at(). One problem I have with these exceptions is that -- at least with current Linux standard C++ libraries -- the what() method just returns the name of the class that threw it. MySQL++ exceptions have much more useful what()'s, which can be sent directly to error logs and such. Therefore, it's likely that real programs will treat these types of exceptions differently. Now, if you wanted to argue in favor of adding another layer just under Exception, parallel to the division in the Standard Library, I could be persuaded...