Do not crash when it is not possible to fetch the release notes package. It does not fix the real issue (why is the release notes package missing?), but at least the installer does not crash.
Details
The initial fix was rather easy: just catching PackageDownloader::FetchError and PackageExtractor::ExtractionFailed. However, these exceptions look like an implementation detail from the outside: the caller needs to know that PackageExtractor and PackageDownloader are used by Product#download.
So after a short discussion with @ancorgs, he suggested following the same approach as Y2Storage: define a set of domain-specific errors. So, now, you do not know who raise the exception, but the error itself.
Coverage increased (+0.003%) to 41.075% when pulling 5cc2434ef4623f987a16047f66a929e2cbf887e7 on handle-release-notes-error into f2d95945f98ae50c732141b749e9ecca21a19e4a on master.
Related to bsc#1193148.
Do not crash when it is not possible to fetch the release notes package. It does not fix the real issue (why is the release notes package missing?), but at least the installer does not crash.
Details
The initial fix was rather easy: just catching
PackageDownloader::FetchError
andPackageExtractor::ExtractionFailed
. However, these exceptions look like an implementation detail from the outside: the caller needs to know thatPackageExtractor
andPackageDownloader
are used byProduct#download
.So after a short discussion with @ancorgs, he suggested following the same approach as
Y2Storage
: define a set of domain-specific errors. So, now, you do not know who raise the exception, but the error itself.