diff --git a/scanner/src/main/kotlin/Scanner.kt b/scanner/src/main/kotlin/Scanner.kt index 594d1543a319f..885c1ee74e499 100644 --- a/scanner/src/main/kotlin/Scanner.kt +++ b/scanner/src/main/kotlin/Scanner.kt @@ -20,7 +20,6 @@ package org.ossreviewtoolkit.scanner import java.io.File -import java.io.IOException import java.time.Instant import kotlin.time.measureTime @@ -705,13 +704,13 @@ class Scanner( try { dir = provenanceDownloader.downloadRecursively(nestedProvenance) archiver.archive(dir, nestedProvenance.root) - } catch (e: IOException) { + } catch (e: DownloadException) { controller.addIssue( pkg.id, Issue( source = "Scanner", - message = "Could not create file archive for " + - "'${pkg.id.toCoordinates()}': ${e.collectMessages()}" + message = "Could not create file archive for '${pkg.id.toCoordinates()}': " + + e.collectMessages() ) ) } finally {