better exception description when task workflow is not found

This commit is contained in:
Julien Fastré 2019-08-27 16:55:14 +02:00
parent b39005cca9
commit 3055973b06
2 changed files with 7 additions and 1 deletions

View File

@ -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 ;

View File

@ -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];