<?php

namespace Fifa\ConnectId\Sdk\Registration\Event\Handler;

class DefaultExceptionEventHandler implements EventHandlerInterface
{
    /**
     * @var callable
     */
    private $handler;

    public function __construct(callable $handler)
    {
        $this->handler = $handler;
    }

    /**
     * @inheritDoc
     */
    public function execute($eventData)
    {
        call_user_func_array($this->handler, [$eventData]);
    }
}