Skip to content

Commit 243282c

Browse files
authored
better handle IOExceptions when scanning an entire directory (#500)
1 parent a31d371 commit 243282c

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/main/java/org/commonwl/view/workflow/WorkflowService.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,13 @@ public List<WorkflowOverview> getWorkflowsFromDirectory(GitDetails gitInfo)
250250
if (eIndex > 0) {
251251
String extension = file.getName().substring(eIndex);
252252
if (extension.equals("cwl")) {
253-
WorkflowOverview overview = cwlService.getWorkflowOverview(file);
254-
if (overview != null) {
255-
workflowsInDir.add(overview);
253+
try {
254+
WorkflowOverview overview = cwlService.getWorkflowOverview(file);
255+
if (overview != null) {
256+
workflowsInDir.add(overview);
257+
}
258+
} catch (IOException err) {
259+
logger.error("Skipping file due to IOException: " + file.toString(), err);
256260
}
257261
}
258262
}

0 commit comments

Comments
 (0)