List:MySQL++« Previous MessageNext Message »
From:Chris Frey Date:July 4 2005 4:46am
Subject:exception hierarchy
View as plain text  

I was reading comp.lang.c++.moderated tonight, and read a post on exceptions,
and thought I'd ask for comments here, relating to mysql++.

Would it be useful to split up the exception hierarchy between
std::runtime_error and std::logic_error?  This would introduce
multiple inheritance into the exception hierarchy if we wanted to
keep a common mysqlpp::Exception base class, but could be useful
for filtering exceptions on logic as well.

Is it worth the effort?

As I look at the exceptions, some of them would be a tough call.
For example, is mysqlpp::BadFieldName a runtime_error or logic_error
in a database GUI application where the user types in field names?

Still, thought it would be worth mentioning.

- Chris

exception hierarchyChris Frey4 Jul
  • Re: exception hierarchyWarren Young5 Jul
    • Re: exception hierarchyChris Frey5 Jul
      • Re: exception hierarchyWarren Young6 Jul