Unverified Commit 233f02c0 authored by Sebastian Castro's avatar Sebastian Castro
Browse files

Catch error in bulk actions

parent ca7d07fa
......@@ -44,9 +44,13 @@ class BulkActionsAbstractController extends Controller
$i = 0;
$renderedViews = [];
foreach ($elements as $key => $element) {
$view = $this->$functionToExecute($element, $dm);
if ($view) {
$renderedViews[] = $view;
try {
$view = $this->$functionToExecute($element, $dm);
if ($view) {
$renderedViews[] = $view;
}
} catch (\Exception $e) {
$renderedViews[] = "Erreur en traitant l'élement $element->getId() : $e->getMessage()";
}
if (0 == (++$i % 100)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment