Replace StringError with the equivalent std::runtime_error.