protected function createClient()
    {
        $options = CMap::mergeArray(
            array(
                'logger' => 'yii',
                'tags' => array(
                    'environment' => $this->environment,
                    'php_version' => phpversion(),
                ),
            ),
            $this->options
        );
        try {
            $this->checkTags($options['tags']);
            return new Raven_Client($this->dns, $options);
        } catch (Exception $e) {
            if (YII_DEBUG) {
                throw new CException('SentryClient failed to create client: ' . $e->getMessage(), (int)$e->getCode());
            } else {
                $this->log($e->getMessage(), CLogger::LEVEL_ERROR);
                throw new CException('SentryClient failed to create client.', (int)$e->getCode());
            }
        }
    }