From 1dfed1cb2aaee1ff10015ab905a5eba12fca00d7 Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Thu, 5 Oct 2023 22:02:58 +0200 Subject: [PATCH] Never say (nearly) Oops again (#4356) Signed-off-by: Phil Ewels Signed-off-by: Paolo Di Tommaso Co-authored-by: Ben Sherman Co-authored-by: Paolo Di Tommaso --- docs/metadata.md | 4 ++-- modules/nextflow/src/main/groovy/nextflow/cli/Launcher.groovy | 2 +- .../src/main/groovy/nextflow/k8s/K8sTaskHandler.groovy | 2 +- .../src/main/groovy/nextflow/processor/StateObj.groovy | 4 ++-- .../main/groovy/nextflow/processor/TaskPollingMonitor.groovy | 4 ++-- .../src/main/groovy/nextflow/processor/TaskProcessor.groovy | 2 +- .../src/main/groovy/nextflow/util/ClusterConfig.groovy | 2 +- .../src/main/groovy/nextflow/util/LoggerHelper.groovy | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/metadata.md b/docs/metadata.md index 7d35375185..529060bb98 100644 --- a/docs/metadata.md +++ b/docs/metadata.md @@ -164,7 +164,7 @@ The `onError` event handler is invoked by Nextflow when a runtime or process err ```groovy workflow.onError { - println "Oops... Pipeline execution stopped with the following message: ${workflow.errorMessage}" + println "Error: Pipeline execution stopped with the following message: ${workflow.errorMessage}" } ``` @@ -186,7 +186,7 @@ workflow.onComplete = { } workflow.onError = { - println "Oops .. something when wrong" + println "Error: something when wrong" } ``` diff --git a/modules/nextflow/src/main/groovy/nextflow/cli/Launcher.groovy b/modules/nextflow/src/main/groovy/nextflow/cli/Launcher.groovy index f3f7087cfc..a2deedbb07 100644 --- a/modules/nextflow/src/main/groovy/nextflow/cli/Launcher.groovy +++ b/modules/nextflow/src/main/groovy/nextflow/cli/Launcher.groovy @@ -180,7 +180,7 @@ class Launcher { colsString.toShort() } catch( Exception e ) { - log.debug "Oops.. not a valid \$COLUMNS value: $colsString" + log.debug "Unexpected terminal \$COLUMNS value: $colsString" return 0 } } diff --git a/modules/nextflow/src/main/groovy/nextflow/k8s/K8sTaskHandler.groovy b/modules/nextflow/src/main/groovy/nextflow/k8s/K8sTaskHandler.groovy index cdbf63411f..8f8b680fc0 100644 --- a/modules/nextflow/src/main/groovy/nextflow/k8s/K8sTaskHandler.groovy +++ b/modules/nextflow/src/main/groovy/nextflow/k8s/K8sTaskHandler.groovy @@ -473,7 +473,7 @@ class K8sTaskHandler extends TaskHandler implements FusionAwareTask { client.podDelete(podName) } else { - log.debug "[K8s] Oops.. invalid delete action" + log.debug "[K8s] Invalid delete action" } } diff --git a/modules/nextflow/src/main/groovy/nextflow/processor/StateObj.groovy b/modules/nextflow/src/main/groovy/nextflow/processor/StateObj.groovy index 51aef88b03..069055065b 100644 --- a/modules/nextflow/src/main/groovy/nextflow/processor/StateObj.groovy +++ b/modules/nextflow/src/main/groovy/nextflow/processor/StateObj.groovy @@ -48,7 +48,7 @@ class StateObj implements Serializable, Cloneable { */ void incSubmitted() { if( poisoned ) - log.debug "Oops.. Cannot process more messages after Poison-Pill was received" + log.debug "Cannot process more messages after Poison-Pill was received" else submitted++ } @@ -58,7 +58,7 @@ class StateObj implements Serializable, Cloneable { */ void incCompleted() { if( completed >= submitted ) { - log.debug "Oops.. Processed messages ($submitted) should not overcome received messages ($submitted) count" + log.debug "Processed messages ($submitted) should not overcome received messages ($submitted) count" } completed++ } diff --git a/modules/nextflow/src/main/groovy/nextflow/processor/TaskPollingMonitor.groovy b/modules/nextflow/src/main/groovy/nextflow/processor/TaskPollingMonitor.groovy index 6b5d281ba8..86e6792627 100644 --- a/modules/nextflow/src/main/groovy/nextflow/processor/TaskPollingMonitor.groovy +++ b/modules/nextflow/src/main/groovy/nextflow/processor/TaskPollingMonitor.groovy @@ -452,7 +452,7 @@ class TaskPollingMonitor implements TaskMonitor { log.debug msg.join('\n') } catch (Throwable e) { - log.debug "Oops.. expected exception", e + log.debug "Unexpected exception dumping run queue", e } } @@ -473,7 +473,7 @@ class TaskPollingMonitor implements TaskMonitor { log.debug msg.join('\n') } catch (Throwable e) { - log.debug "Oops.. unexpected exception", e + log.debug "Unexpected exception dumping submit queue", e } } diff --git a/modules/nextflow/src/main/groovy/nextflow/processor/TaskProcessor.groovy b/modules/nextflow/src/main/groovy/nextflow/processor/TaskProcessor.groovy index 8e71969661..fbef4b2950 100644 --- a/modules/nextflow/src/main/groovy/nextflow/processor/TaskProcessor.groovy +++ b/modules/nextflow/src/main/groovy/nextflow/processor/TaskProcessor.groovy @@ -2165,7 +2165,7 @@ class TaskProcessor { return CacheHelper.hasher(keys, mode).hash() } catch (Throwable e) { - final msg = "Oops.. something went wrong while creating task '$name' unique id -- Offending keys: ${ keys.collect {"\n - type=${it.getClass().getName()} value=$it"} }" + final msg = "Something went wrong while creating task '$name' unique id -- Offending keys: ${ keys.collect {"\n - type=${it.getClass().getName()} value=$it"} }" throw new UnexpectedException(msg,e) } } diff --git a/modules/nextflow/src/main/groovy/nextflow/util/ClusterConfig.groovy b/modules/nextflow/src/main/groovy/nextflow/util/ClusterConfig.groovy index 12d9d79189..1611d4af1b 100644 --- a/modules/nextflow/src/main/groovy/nextflow/util/ClusterConfig.groovy +++ b/modules/nextflow/src/main/groovy/nextflow/util/ClusterConfig.groovy @@ -170,7 +170,7 @@ class ClusterConfig { return getClusterJoin().tokenize(':')[1] } catch (Throwable e) { - log.debug "Oops.. Cannot fetch cloud driver name", e + log.debug "Cannot fetch cloud driver name", e return null } } diff --git a/modules/nextflow/src/main/groovy/nextflow/util/LoggerHelper.groovy b/modules/nextflow/src/main/groovy/nextflow/util/LoggerHelper.groovy index 33e28bc473..01f4e1af51 100644 --- a/modules/nextflow/src/main/groovy/nextflow/util/LoggerHelper.groovy +++ b/modules/nextflow/src/main/groovy/nextflow/util/LoggerHelper.groovy @@ -592,7 +592,7 @@ class LoggerHelper { return ExceptionUtils.getStackTrace(e).split('\n') } catch( Throwable t ) { - log.warn "Oops.. something went wrong while formatting the error stack trace | ${t.message ?: t}", e + log.warn "Something went wrong while formatting the error stack trace | ${t.message ?: t}", e return Collections.emptyList() as String[] } }