From 320ba754a4dcfb096807cfedbab8264be11dfb32 Mon Sep 17 00:00:00 2001 From: Richard Klees Date: Thu, 13 Jun 2024 08:13:32 +0200 Subject: [PATCH] fix: correct exception handling in PHP wrapper (#3901) The `catch` is hinting on `\Exception` [1] which has not `getName`-method. To identify the type of exception, `get_class` can be used. [1] https://www.php.net/manual/de/class.exception.php Co-authored-by: HugoCasa --- backend/windmill-worker/src/php_executor.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/windmill-worker/src/php_executor.rs b/backend/windmill-worker/src/php_executor.rs index 9c4f8fc40d..1093488341 100644 --- a/backend/windmill-worker/src/php_executor.rs +++ b/backend/windmill-worker/src/php_executor.rs @@ -229,7 +229,7 @@ try {{ }} catch (Exception $e) {{ $err = [ "message" => $e->getMessage(), - "name" => $e->getName(), + "name" => get_class($e), "stack" => $e->getTraceAsString() ]; $step_id = getenv('WM_FLOW_STEP_ID');