You should inherit from std::exception publicly.