3b95ea539b1de53a5071d86dd5ba91f293bc3ebe
3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
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 +--------------------------------------------------------------------+
12 namespace Civi\API\Event
;
15 * Handle any exceptions that occur while processing an API request.
17 * Event name: 'civi.api.exception'
19 class ExceptionEvent
extends Event
{
27 * @param \Exception $exception
28 * The exception which arose while processing the API request.
29 * @param \Civi\API\Provider\ProviderInterface $apiProvider
30 * The API provider responsible for executing the request.
31 * @param array $apiRequest
32 * The full description of the API request.
33 * @param \Civi\API\Kernel $apiKernel
34 * The kernel which fired the event.
36 public function __construct($exception, $apiProvider, $apiRequest, $apiKernel) {
37 $this->exception
= $exception;
38 parent
::__construct($apiProvider, $apiRequest, $apiKernel);
44 public function getException() {
45 return $this->exception
;