Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error handling when downloading repo metadata (RhBug:1594121) #661

Merged
merged 2 commits into from Jan 11, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion libdnf/repo/Repo.cpp
Expand Up @@ -634,6 +634,7 @@ std::unique_ptr<LrHandle> Repo::Impl::lrHandleInitRemote(const char *destdir, bo
handleSetOpt(h.get(), LRO_URLS, mirrors);
}
} else if (!conf->baseurl().getValue().empty()) {
handleSetOpt(h.get(), LRO_HMFCB, static_cast<LrHandleMirrorFailureCb>(mirrorFailureCB));
size_t len = conf->baseurl().getValue().size();
const char * urls[len + 1];
for (size_t idx = 0; idx < len; ++idx)
Expand Down Expand Up @@ -1359,7 +1360,7 @@ void Repo::Impl::downloadUrl(const char * url, int fd)
callbacks->end();

if (err)
throwException(std::move(err));
throw LrExceptionWithSourceUrl(err->code, err->message, url);
}

void Repo::Impl::setHttpHeaders(const char * headers[])
Expand Down