Differential D10585 Diff 25583 src/applications/diffusion/conduit/DiffusionSearchQueryConduitAPIMethod.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/conduit/DiffusionSearchQueryConduitAPIMethod.php
Show All 21 Lines | return array( | ||||
'grep' => 'required string', | 'grep' => 'required string', | ||||
'limit' => 'optional int', | 'limit' => 'optional int', | ||||
'offset' => 'optional int', | 'offset' => 'optional int', | ||||
); | ); | ||||
} | } | ||||
protected function defineCustomErrorTypes() { | protected function defineCustomErrorTypes() { | ||||
return array( | return array( | ||||
'ERR-GREP-COMMAND' => 'Grep command failed.'); | 'ERR-GREP-COMMAND' => 'Grep command failed.', | ||||
); | |||||
} | } | ||||
protected function getResult(ConduitAPIRequest $request) { | protected function getResult(ConduitAPIRequest $request) { | ||||
try { | try { | ||||
$results = parent::getResult($request); | $results = parent::getResult($request); | ||||
} catch (CommandException $ex) { | } catch (CommandException $ex) { | ||||
throw id(new ConduitException('ERR-GREP-COMMAND')) | throw id(new ConduitException('ERR-GREP-COMMAND')) | ||||
->setErrorDescription($ex->getStderr()); | ->setErrorDescription($ex->getStderr()); | ||||
▲ Show 20 Lines • Show All 79 Lines • Show Last 20 Lines |