From 43b8aada20478660f0abdc7d40cc6d4586508a85 Mon Sep 17 00:00:00 2001 From: Jacek Sieka Date: Thu, 6 May 2021 09:46:58 +0200 Subject: [PATCH] Add message to task failure message (#183) --- chronos/asyncfutures2.nim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/chronos/asyncfutures2.nim b/chronos/asyncfutures2.nim index 88023a98..b78058c3 100644 --- a/chronos/asyncfutures2.nim +++ b/chronos/asyncfutures2.nim @@ -514,8 +514,9 @@ template taskFutureLocation(future: FutureBase): string = template taskErrorMessage(future: FutureBase): string = "Asynchronous task " & taskFutureLocation(future) & - " finished with an exception \"" & $future.error.name & "\"!\nStack trace: " & - future.error.getStackTrace() + " finished with an exception \"" & $future.error.name & + "\"!\nMessage: " & future.error.msg & + "\nStack trace: " & future.error.getStackTrace() template taskCancelMessage(future: FutureBase): string = "Asynchronous task " & taskFutureLocation(future) & " was cancelled!"