public function createErrorHandler()
    {
        $config = $this->getConfig();
        if (!isset($config['error_handler'])) {
            throw new Exception\RuntimeException('Not found error handler config');
        }
        
        $errorHandlerConfig = $config['error_handler']->toArray();
        $adapter = !isset($errorHandlerConfig['adapter']) ? HandlerDefault::class : $errorHandlerConfig['adapter'];
        $this->setServiceFactories('errorHandler', $adapter, false);
    }