AuditFilesBatchProcess.php in Audit Files 4.x
File
src/Batch/AuditFilesBatchProcess.php
View source
<?php
namespace Drupal\auditfiles\Batch;
use Drupal\Core\StringTranslation\TranslatableMarkup;
class AuditFilesBatchProcess {
public static function finishBatch($success, $results, $operations) {
$messenger = \Drupal::service('messenger');
if (!$success) {
$error_operation = reset($operations);
$messenger
->addError(new TranslatableMarkup('An error occurred while processing @operation with arguments : @args', [
'@operation' => $error_operation[0],
'@args' => print_r($error_operation[0], TRUE),
]));
}
}
}