ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
ErrorHandling.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 namespace ILIAS\Data\Description;
22 
23 trait ErrorHandling
24 {
25  protected function mergeErrors(array &$errors): \Closure
26  {
27  return function () use (&$errors) {
28  foreach ($errors as $errs) {
29  foreach ($errs() as $e) {
30  yield $e;
31  }
32  }
33  };
34  }
35 }