src/Errors.php
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];
    }
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];
    }
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 ] ; }
Get exception code

@param \Exception $exception

@return int

@throws \RuntimeException
Get exception code