ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
CrawlerExceptionLogger.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
28{
29 protected array $exceptions = array();
30
34 public function handleException(CrawlerException $ex): void
35 {
36 $this->exceptions[] = $ex;
37 }
38
44 public function exceptions(): array
45 {
46 $return = $this->exceptions;
47 $this->exceptions = array();
48 return $return;
49 }
50}
Sometimes we would like to store exception, instead of throwing them on spot, e.g.
exceptions()
Get all exception thrown so far and reset the logger.
handleException(CrawlerException $ex)
Handle an exception request.