I haven't the read list is a week, so I apologize if responses to earlier posts have been resolved already.

Someone (I think the serialization author) talked about how he didn't like the Standard exception philosophy and tried custom classes and enum values for exceptions instead. I was thinking that the techniques could be combined.

Instead of this

class my_exception
{
public:
enum problems { ... };

//...

problems whats_up() const;

//...
};

We could have

class my_exception_base
: public std::exception
{
public:
enum problems { ... };

explicit my_exception_base( problems p );

virtual const char * what() const;
problems whats_up() const;
};

template < my_exception_base::problems P >
class my_exception
: public my_exception_base
{
public:
my_exception()
: my_exception_base( P )
{}
};

Now everyone can be happy.

Daryle

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to