malkusch\lock\mutex\TransactionalMutex::hasPDOException PHP Метод

hasPDOException() приватный статический Метод

Checks if an exception or any of its previous exceptions is a PDOException.
private static hasPDOException ( Exception $exception ) : boolean
$exception Exception The exception.
Результат boolean True if there's a PDOException.
    private static function hasPDOException(\Exception $exception)
    {
        if ($exception instanceof \PDOException) {
            return true;
        }
        if ($exception->getPrevious() === null) {
            return false;
        }
        return self::hasPDOException($exception->getPrevious());
    }