throw_exception() now ensures that the exception type passed to it derives publicly from std::exception.