From 3055973b060cb8650da66fbdd9fa768ff4f5c125 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 27 Aug 2019 16:55:14 +0200 Subject: [PATCH] better exception description when task workflow is not found --- CHANGELOG.md | 6 ++++++ Workflow/TaskWorkflowManager.php | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 80b8b41b3..a332515e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,3 +34,9 @@ Version 1.5.8 ============= - add returnPath to page Show and List for Single tasks ; + +Master branch +============= + +- better exception description when task workflow is not found ; + diff --git a/Workflow/TaskWorkflowManager.php b/Workflow/TaskWorkflowManager.php index e5a111dad..cf34f4c66 100644 --- a/Workflow/TaskWorkflowManager.php +++ b/Workflow/TaskWorkflowManager.php @@ -60,7 +60,7 @@ class TaskWorkflowManager implements SupportStrategyInterface throw new \LogicException("More than one TaskWorkflowDefinition supports " . "this task. This should not happens."); } elseif ($count === 0) { - throw new \LogicException("No taskWorkflowDefinition supports this task."); + throw new \LogicException(\sprintf("No taskWorkflowDefinition supports this task type: %s (task id: %s).", $task->getType(), $task->getId())); } return $definitions[0];