I have several quistions about Poco::Exception base class. Please, could anybody explain me:
1) What is a reason to use throw() in the some functions' signatures of Poco::Exception class? I noticed only virtual functions have that kind of signature.
2) Why are not all additional functions declared as virtual, such as message(), displayText(), nested(), and code()?
3) Why is any exception in the hierarchy of Poco exceptions not using virtual inheritance?
I ask about this, because I have found myself in a situation where I need to have three kind of exception classes, two of them have some additional personal data and third has data from the both foregoing.
Obviously, I have options to implement this, my first thing was to create base class for each of the two with virtual inheritance from Poco::Exception (question 3).
When I started implementing third class using multiple virtual inheritance from the two bases it has never worked, because of nonvirtual stuff (question 2).
My next idea was to create my own base exception class, for this reason I examined the interface of Poco::Exception class carefully and found that only this class has members with throw() in their signatures (question 1).
Whole library except exception classes does not have throw() in members signatures, so I think this has a reason and I am not fully understand exception mechanism espeically from crossplatform point of view.
Now, I consider about creating two base class for special data, and then using nonvirtual multiple inheritance from Poco::Exception and my base classes.
Thanks for you answers in advance.