Merge pull request #17144 from lcdservices/dev-core-1716
[civicrm-core.git] / Civi / Core / Event / UnhandledExceptionEvent.php
CommitLineData
4caeca04
TO
1<?php
2/*
3 +--------------------------------------------------------------------+
41498ac5 4 | Copyright CiviCRM LLC. All rights reserved. |
4caeca04 5 | |
41498ac5
TO
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
4caeca04 9 +--------------------------------------------------------------------+
d25dd0ee 10 */
4caeca04
TO
11
12namespace Civi\Core\Event;
13
14/**
c73e3098 15 * Class UnhandledExceptionEvent
4caeca04
TO
16 * @package Civi\API\Event
17 */
c73e3098 18class UnhandledExceptionEvent extends GenericHookEvent {
4caeca04
TO
19
20 /**
21 * @var \Exception
22 */
23 public $exception;
24
25 /**
8d0a3eb6
TO
26 * Reserved for future use.
27 *
28 * @var mixed
4caeca04
TO
29 */
30 public $request;
31
7fe37828
EM
32 /**
33 * @param $e
34 * @param $request
35 */
bed98343 36 public function __construct($e, $request) {
4caeca04
TO
37 $this->request = $request;
38 $this->exception = $e;
39 }
96025800 40
c73e3098
TO
41 /**
42 * @inheritDoc
43 */
44 public function getHookValues() {
c64f69d9 45 return [$this->exception, $this->request];
c73e3098
TO
46 }
47
4caeca04 48}