[zypp-commit] r7023 - /trunk/libzypp/zypp/RepoManager.cc
Author: jkupec Date: Thu Aug 30 17:31:17 2007 New Revision: 7023 URL: http://svn.opensuse.org/viewcvs/zypp?rev=7023&view=rev Log: - remember the cause of the RepoException when refreshing metadata (#301022) Modified: trunk/libzypp/zypp/RepoManager.cc Modified: trunk/libzypp/zypp/RepoManager.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/RepoManager.cc?rev=7023&r1=7022&r2=7023&view=diff ============================================================================== --- trunk/libzypp/zypp/RepoManager.cc (original) +++ trunk/libzypp/zypp/RepoManager.cc Thu Aug 30 17:31:17 2007 @@ -517,6 +517,9 @@ assert_alias(info); assert_urls(info); + // we will throw this later if no URL checks out fine + RepoException rexception(_("Valid metadata not found at specified URL(s)")); + // try urls one by one for ( RepoInfo::urls_const_iterator it = info.baseUrlsBegin(); it != info.baseUrlsEnd(); ++it ) { @@ -608,10 +611,16 @@ { ZYPP_CAUGHT(e); ERR << "Trying another url..." << endl; + + // remember the exception caught for the *first URL* + // if all other URLs fail, the rexception will be thrown with the + // cause of the problem of the first URL remembered + if (it == info.baseUrlsBegin()) + rexception.remember(e); } } // for every url ERR << "No more urls..." << endl; - ZYPP_THROW(RepoException(_("Valid metadata not found at specified URL(s)"))); + ZYPP_THROW(rexception); } //////////////////////////////////////////////////////////////////////////// -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org
participants (1)
-
jkupec@svn.opensuse.org