Skip to content

Commit

Permalink
more details on test error (#4097)
Browse files Browse the repository at this point in the history
* more details on test error

(this would have saved me some time debugging a downstream issue)

* fmt
  • Loading branch information
mpollmeier authored Jan 29, 2024
1 parent 06ecfb0 commit 743964f
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,10 @@ package object testing {
}

if (fileName != "") {
val file = cpg.file.nameExact(fileName).head
val file = cpg.file
.nameExact(fileName)
.headOption
.getOrElse(throw new RuntimeException(s"file with name='$fileName' not found"))
graph.addEdge(method, file, EdgeTypes.SOURCE_FILE)
}
}
Expand Down

0 comments on commit 743964f

Please sign in to comment.