Changeset View
Changeset View
Standalone View
Standalone View
src/conduit/ArcanistConduitCallFuture.php
Show First 20 Lines • Show All 66 Lines • ▼ Show 20 Lines | $this->raiseException( | ||||
$message); | $message); | ||||
} | } | ||||
protected function didReceiveResult($result) { | protected function didReceiveResult($result) { | ||||
return $result; | return $result; | ||||
} | } | ||||
protected function didReceiveException($exception) { | protected function didReceiveException($exception) { | ||||
if ($exception instanceof ConduitClientException) { | |||||
switch ($exception->getErrorCode()) { | switch ($exception->getErrorCode()) { | ||||
case 'ERR-INVALID-SESSION': | case 'ERR-INVALID-SESSION': | ||||
if (!$this->getEngine()->getConduitToken()) { | if (!$this->getEngine()->getConduitToken()) { | ||||
$this->raiseLoginRequired(); | $this->raiseLoginRequired(); | ||||
} | } | ||||
break; | break; | ||||
case 'ERR-INVALID-AUTH': | case 'ERR-INVALID-AUTH': | ||||
$this->raiseInvalidAuth(); | $this->raiseInvalidAuth(); | ||||
break; | break; | ||||
} | } | ||||
} | |||||
throw $exception; | throw $exception; | ||||
} | } | ||||
private function getInstallCommand() { | private function getInstallCommand() { | ||||
$conduit_uri = $this->getConduitURI(); | $conduit_uri = $this->getConduitURI(); | ||||
return csprintf( | return csprintf( | ||||
Show All 24 Lines |