That way I can be as specific or general as I want with throw/catch.
And I find it a good practice to make every exception is a subclass of std::exception. That way every exception thrown follows, at a minimum, the semantics defined for std::exception. GCC, for example, can actually do something useful (print the exception type and message) with an uncaught exception in such cases.
Thanks for you feedbacks. Bazzy, you are right. I'll consider your advices in future, but this specific work is more on data structures and complexity.