Merge pull request #15410 from herbdool/cloud-21
[civicrm-core.git] / Civi / Core / Event / UnhandledExceptionEvent.php
1 <?php
2 /*
3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
5 | |
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 |
9 +--------------------------------------------------------------------+
10 */
11
12 namespace Civi\Core\Event;
13
14 /**
15 * Class UnhandledExceptionEvent
16 * @package Civi\API\Event
17 */
18 class UnhandledExceptionEvent extends GenericHookEvent {
19
20 /**
21 * @var \Exception
22 */
23 public $exception;
24
25 /**
26 * Reserved for future use.
27 *
28 * @var mixed
29 */
30 public $request;
31
32 /**
33 * @param $e
34 * @param $request
35 */
36 public function __construct($e, $request) {
37 $this->request = $request;
38 $this->exception = $e;
39 }
40
41 /**
42 * @inheritDoc
43 */
44 public function getHookValues() {
45 return [$this->exception, $this->request];
46 }
47
48 }