protected function emitDebugEvent($name, \Throwable $exception)
    {
        // Don't proceed when we've got no Emitter.
        if (null === $this->emitter) {
            return null;
        }

        $this->emitter->emit($name, $event = new Event($exception, $this));

        // Event Listeners may override the Exception. Need to account for that.
        return $event->getThrowable();
    }