Skip to content

Commit

Permalink
Print id when catching exception and make sure agent is never null
Browse files Browse the repository at this point in the history
  • Loading branch information
kwahlin committed Sep 12, 2023
1 parent faf7e44 commit 4bf0026
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions librisworks/scripts/find-work-clusters.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def process = { bib ->
}
}
catch (Exception e) {
failedQueries.println(e)
failedQueries.println("Error in ${bib.doc.shortId}: ${e}")
e.printStackTrace()
return
}
Expand Down Expand Up @@ -125,7 +125,7 @@ private List contributors(bib) {
private List contributorStrings(contribution) {
List variants = asList(contribution?.agent) + asList(getPathSafe(contribution, ['agent', 'hasVariant']))

variants.collect { name(it) }.grep()
variants.grep().collect { name(it) }.grep()
}

private String name(Map agent) {
Expand Down

0 comments on commit 4bf0026

Please sign in to comment.