1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-22 14:52:40 +01:00

Catch "ConduitClientException", not "Exception", in "arc patch"

Summary: This may raise other types of exceptions, e.g. http/network exceptions, where getErrorCode() is not defined.

Test Plan: Reasoned about beahvior.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1804
This commit is contained in:
epriestley 2012-03-06 20:14:34 -08:00
parent 81019a790e
commit 2c26304dd2

View file

@ -349,7 +349,7 @@ EOTEXT
$param);
break;
}
} catch (Exception $ex) {
} catch (ConduitClientException $ex) {
if ($ex->getErrorCode() == 'ERR-INVALID-SESSION') {
// Phabricator is not configured to allow anonymous access to
// Differential.