think\exception\Handle::getCode PHP Метод

getCode() защищенный Метод

获取错误编码 ErrorException则使用错误级别作为错误编码
protected getCode ( Exception $exception ) : integer
$exception Exception
Результат integer 错误编码
    protected function getCode(Exception $exception)
    {
        $code = $exception->getCode();
        if (!$code && $exception instanceof ErrorException) {
            $code = $exception->getSeverity();
        }
        return $code;
    }