ILIAS  trunk Revision v11.0_alpha-1723-g8e69f309bab
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
CrawlerExceptionLogger.php
Go to the documentation of this file.
1 <?php
2 
19 declare(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.
handleException(CrawlerException $ex)
Handle an exception request.
exceptions()
Get all exception thrown so far and reset the logger.