From b2b86b92a9d33d801294a0794213a5ac000ed5a4 Mon Sep 17 00:00:00 2001 From: astanley Date: Tue, 17 Jun 2025 14:41:01 -0300 Subject: [PATCH] detailed errors --- src/Service/HocrSanitizerBatch.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Service/HocrSanitizerBatch.php b/src/Service/HocrSanitizerBatch.php index 045efe3..67fa38d 100644 --- a/src/Service/HocrSanitizerBatch.php +++ b/src/Service/HocrSanitizerBatch.php @@ -50,8 +50,13 @@ class HocrSanitizerBatch { if (!empty($results['renamed'])) { \Drupal::messenger()->addStatus(t('Renamed @count files.', ['@count' => count($results['renamed'])])); } + if (!empty($results['errors'])) { - \Drupal::messenger()->addWarning(t('Some errors occurred: @count issues.', ['@count' => count($results['errors'])])); + \Drupal::messenger()->addWarning(t('Some errors occurred during the batch process:')); + + foreach ($results['errors'] as $error) { + \Drupal::messenger()->addWarning($error); + } } } }