protected function getExceptionName($exception)
    {
        if ($exception instanceof Exception) {
            return $exception->getName();
        } else {
            $classNameExp = explode('\\', get_class($exception));
            return end($classNameExp);
        }
    }
protected function getExceptionName($exception)
    {
        if ($exception instanceof Exception) {
            return $exception->getName();
        } else {
            $classNameExp = explode('\\', get_class($exception));
            return end($classNameExp);
        }
    }
protected function getExceptionName ( $ exception ) { if ( $ exception instanceof Exception ) { return $ exception -> getName ( ) ; } else { $ classNameExp = explode ( '\\' , get_class ( $ exception ) ) ; return end ( $ classNameExp ) ; } }
Get name of exception
@param \Throwable $exception
@return string
Get name of exception