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); + } } } }