From 60d9adf0f2d20ade211249bf1d8416a09fd8f58d Mon Sep 17 00:00:00 2001 From: Tim Hunt Date: Tue, 24 Oct 2023 18:17:14 +0100 Subject: [PATCH] MDL-79835 behat_core_generator: remove misleading error obfuscation --- lib/behat/classes/behat_core_generator.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/behat/classes/behat_core_generator.php b/lib/behat/classes/behat_core_generator.php index 219333bb8bc..9275712babb 100644 --- a/lib/behat/classes/behat_core_generator.php +++ b/lib/behat/classes/behat_core_generator.php @@ -470,13 +470,7 @@ class behat_core_generator extends behat_generator_base { } } - // Custom exception. - try { - $this->datagenerator->create_module($activityname, $data, $cmoptions); - } catch (coding_exception $e) { - throw new Exception('\'' . $activityname . '\' activity can not be added using this step,' . - ' use the step \'I add a "ACTIVITY_OR_RESOURCE_NAME_STRING" to section "SECTION_NUMBER"\' instead'); - } + $this->datagenerator->create_module($activityname, $data, $cmoptions); } /**