From 6250296648fa64bc8124caa6f9407ce4b4c56dd4 Mon Sep 17 00:00:00 2001 From: Andre Klapper Date: Thu, 16 May 2024 10:53:33 +0200 Subject: [PATCH] Correct call to non-existing PhutilFileLockException in support/unit/lock.php Summary: `PhutilFileLockException` does not exist. Per https://we.phorge.it/source/arcanist/browse/master/src/filesystem/PhutilFileLock.php$54-66 , if lock acquisition fails it is supposed to throw a `PhutilLockException` instead. Test Plan: Grep the code base. Or, run this, from arcanist, from two different terminals: php ./support/unit/lock.php asd.txt After this change, the exception is correctly managed. Reviewers: O1 Blessed Committers, valerio.bozzolan Reviewed By: O1 Blessed Committers, valerio.bozzolan Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno Differential Revision: https://we.phorge.it/D25641 --- support/unit/lock.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/support/unit/lock.php b/support/unit/lock.php index b4e13a60..1670cd12 100755 --- a/support/unit/lock.php +++ b/support/unit/lock.php @@ -51,7 +51,7 @@ $lock = PhutilFileLock::newForPath($file); try { $lock->lock($args->getArg('wait')); -} catch (PhutilFileLockException $ex) { +} catch (PhutilLockException $ex) { $console->writeOut( "**%s** %s\n", pht('UNABLE TO ACQUIRE LOCK:'),