Skip to content

Commit

Permalink
Change "no such file" error message to "no such file or directory" [c…
Browse files Browse the repository at this point in the history
…i fast] (#3547)


Signed-off-by: Ben Sherman <bentshermann@gmail.com>
  • Loading branch information
bentsherman committed Jan 14, 2023
1 parent fde2ac2 commit c292d84
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion modules/nextflow/src/main/groovy/nextflow/Nextflow.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class Nextflow {
FileHelper.visitFiles(opts, fs.getPath(folder), pattern) { Path it -> result.add(it) }
}
catch (NoSuchFileException e) {
log.debug "No such file: $folder -- Skipping visit"
log.debug "No such file or directory: $folder -- Skipping visit"
}
return result

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ class PathVisitor {
}
}
catch (NoSuchFileException e) {
log.debug "No such file: $folder -- Skipping visit"
log.debug "No such file or directory: $folder -- Skipping visit"
}
finally {
if( !count && opts.checkIfExists as boolean )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1277,7 +1277,7 @@ class TaskProcessor {
final fail = e instanceof InvocationTargetException ? e.targetException : e

if( fail instanceof NoSuchFileException ) {
return "No such file: $fail.message"
return "No such file or directory: $fail.message"
}
if( fail instanceof MissingPropertyException ) {
def name = fail.property ?: LoggerHelper.getDetailMessage(fail)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -463,10 +463,10 @@ class LoggerHelper {
buffer.append("No such field: ${normalize(fail.message)}")
}
else if( fail instanceof NoSuchFileException ) {
buffer.append("No such file: ${normalize(fail.message)}")
buffer.append("No such file or directory: ${normalize(fail.message)}")
}
else if( fail instanceof FileAlreadyExistsException ) {
buffer.append("File already exist: $fail.message")
buffer.append("File or directory already exists: $fail.message")
}
else if( fail instanceof ClassNotFoundException ) {
buffer.append("Class not found: ${normalize(fail.message)}")
Expand Down

0 comments on commit c292d84

Please sign in to comment.