Skip to content

Commit

Permalink
Update Nextflow error box
Browse files Browse the repository at this point in the history
- If log file exists and ERROR lines exist,
  point only to the log file and not to
  the error report above.
  • Loading branch information
Cecilia-Sensalari committed Aug 23, 2021
1 parent af52ba3 commit 2196f0b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -1049,6 +1049,10 @@ workflow.onError {
for ( line : log_file.readLines().findAll { it =~ /ERROR/ } ) {
error_box += "${line}\n"
}

// Point to the complete output of the stopped process log file
error_box += "\nMore details may be found in the following log file:\n" + \
"${log_filename}\n"
}
// If the process log file exists but there are no "ERROR" lines,
// print a message from errorReport and errorMessage (it's an unexpected error)
Expand All @@ -1061,11 +1065,11 @@ workflow.onError {
if ( workflow.errorMessage != null ) {
error_box += "${workflow.errorMessage}\n"
}
}

// In any case, point to the complete output of the stopped process log file
error_box += "\nMore details can be found in the error report above or in the following log file:\n" + \
"${log_filename}\n"
// Point to errorReport and to the complete output of the stopped process log file
error_box += "\nMore details can be found in the error report above or in the following log file:\n" + \
"${log_filename}\n"
}
}

// Else if the process log file doesn't exist, investigate the cause in errorReport and errorMessage
Expand Down

0 comments on commit 2196f0b

Please sign in to comment.