From b8da6a0782c083a9afb6ac684ce475e0404b13ea Mon Sep 17 00:00:00 2001 From: Niklas Keller Date: Fri, 14 Jan 2022 20:06:23 +0100 Subject: [PATCH] Improve exception message of UnhandledFutureError Fixes #380. --- src/Future/UnhandledFutureError.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Future/UnhandledFutureError.php b/src/Future/UnhandledFutureError.php index 82357d3..79d463f 100644 --- a/src/Future/UnhandledFutureError.php +++ b/src/Future/UnhandledFutureError.php @@ -9,7 +9,7 @@ final class UnhandledFutureError extends \Error { public function __construct(\Throwable $previous) { - $message = 'Unhandled future error: "' . $previous->getMessage() + $message = 'Unhandled future: ' . $previous::class . ': "' . $previous->getMessage() . '"; Await the Future with Future::await() before the future is destroyed or use ' . 'Future::ignore() to suppress this exception';