Reasons for structure of standard exception hierarchy

This is a picky thing and it is probably just my OCD flairing up but I was wondering why the standard exception class hierarchy is set up as it is.

exception
  bad_alloc
  bad_cast
  bad_typeid
  bad_exception
  ios_base::failure
  runtime_error
    subclasses...
  logic_error
    subclasses...

Couldn't all the bad_* exceptions just be subclasses of something like lang_support_error? And ios_base::failure seems completely out of place.

Is there some historical or technical reasons the hierachy ended up like this?

6
задан ValenceElectron 16 May 2011 в 16:22
поделиться