protected function getErrorType(\Exception $exception)
    {
        $errorType = get_class($exception);

        $pos = strrpos($errorType, '\\');
        if ($pos !== false) {
            $errorType = substr($errorType, $pos);
        }

        $errorType = Str::replaceLast($errorType, 'Exception', '');

        if (!$errorType) {
            $errorType = 'Unknown';
        }

        return $errorType;
    }
protected function getErrorType(\Exception $exception)
    {
        $errorType = get_class($exception);

        $pos = strrpos($errorType, '\\');
        if ($pos !== false) {
            $errorType = substr($errorType, $pos);
        }

        $errorType = Str::replaceLast($errorType, 'Exception', '');

        if (!$errorType) {
            $errorType = 'Unknown';
        }

        return $errorType;
    }
protected function getErrorType ( \ Exception $ exception ) { $ errorType = get_class ( $ exception ) ; $ pos = strrpos ( $ errorType , '\\' ) ; if ( $ pos !== false ) { $ errorType = substr ( $ errorType , $ pos ) ; } $ errorType = Str :: replaceLast ( $ errorType , 'Exception' , '' ) ; if ( ! $ errorType ) { $ errorType = 'Unknown' ; } return $ errorType ; }
Convert the exception to an error type.

@param \Exception $exception

@return string
Convert the exception to an error type .