Skip to content

Commit 56ccbc1

Browse files
committed
Improve error reporting
Signed-off-by: Paolo Di Tommaso <[email protected]>
1 parent 2277624 commit 56ccbc1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/main/groovy/io/seqera/wave/ErrorHandler.groovy

+7-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,13 @@ class ErrorHandler {
3434
final errId = LongRndKey.rndHex()
3535
def msg = t.message
3636
if( t instanceof WaveException && msg ) {
37-
log.warn (t.cause ? "$msg -- Cause: ${t.cause.message ?: t.cause}".toString() : msg )
37+
msg = (t.cause ? "$msg -- Cause: ${t.cause.message ?: t.cause}".toString() : msg )
38+
if( !debug ) {
39+
log.warn(msg)
40+
}
41+
else {
42+
log.warn(msg,t)
43+
}
3844
}
3945
else {
4046
if( debug && !msg )

0 commit comments

Comments
 (0)