Skip to content

Commit

Permalink
fix(scanner): Catch a DownloadException instead of IOException
Browse files Browse the repository at this point in the history
The `downloadRecursively()` function rethrows `IOException` as
`DownloadException`, so the latter needs to be catched here.

Signed-off-by: Sebastian Schuberth <[email protected]>
  • Loading branch information
sschuberth committed Feb 19, 2024
1 parent 1ea5f37 commit d30e302
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions scanner/src/main/kotlin/Scanner.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
package org.ossreviewtoolkit.scanner

import java.io.File
import java.io.IOException
import java.time.Instant

import kotlin.time.measureTime
Expand Down Expand Up @@ -705,7 +704,7 @@ class Scanner(
try {
dir = provenanceDownloader.downloadRecursively(nestedProvenance)
archiver.archive(dir, nestedProvenance.root)
} catch (e: IOException) {
} catch (e: DownloadException) {
controller.addIssue(
pkg.id,
Issue(
Expand Down

0 comments on commit d30e302

Please sign in to comment.