1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-08 07:52:39 +01:00

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
This commit is contained in:
Andre Klapper 2024-05-16 10:53:33 +02:00
parent 3cb117684f
commit 6250296648

View file

@ -51,7 +51,7 @@ $lock = PhutilFileLock::newForPath($file);
try { try {
$lock->lock($args->getArg('wait')); $lock->lock($args->getArg('wait'));
} catch (PhutilFileLockException $ex) { } catch (PhutilLockException $ex) {
$console->writeOut( $console->writeOut(
"**%s** %s\n", "**%s** %s\n",
pht('UNABLE TO ACQUIRE LOCK:'), pht('UNABLE TO ACQUIRE LOCK:'),