protected function dispatchEventToEventCallbacks($event, $arguments)
    {
        foreach ($this->getEventCallbacks($event) as $callback) {
            try {
                call_user_func_array($callback, $arguments);
            } catch (Exception $e) {
                $this->handleException($e);
            } catch (Throwable $e) {
                $this->handleException(new FatalThrowableError($e));
            }
        }
    }