public function getExceptionCode(\Exception $exception)
    {
        $class = get_class($exception);
        $exceptions = $this->getExceptions();

        if (!isset($exceptions[$class])) {
            throw new \RuntimeException(sprintf(
                'Not exist exception "%s" in storage.',
                $class
            ));
        }

        return $exceptions[$class];
    }