Boost logo

Boost :

From: Jeff Garland (jeff_at_[hidden])
Date: 2002-11-17 11:17:03


> >Why not derive a different exception from archive_exception for each of the
> >enum types instead of using the enum? This would be better because if a user
> >creates a new archive type they might need to add an exception type which is
> >not currently possible.
>
> Wouldn't it be better for the user to derive his own exception from archive_exception?

One more thing that I almost forgot. You should take the more complete descriptions in
the comments next to the enum and make them the returned message. So for example for
pointer conflict:
   msg = "Archive Exception: an attempt has been made to directly...."

If I am doing something like:
  catch(std::exception& e) {
        error_log << e.what();
  }

I am going to much prefer something that gives me some sort of real
clue about the nature of the problem instead of the cryptic message
"pointer conflict"...

Jeff


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk