Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P617
project_init.diff
Active
Public
Actions
Authored by
epriestley
on Nov 30 2012, 3:57 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Flag For Later
Award Token
Tags
None
Referenced Files
F26142: project_init.diff
Feb 24 2016, 1:31 AM
2016-02-24 01:31:52 (UTC+0)
Subscribers
None
diff --git a/src/workflow/ArcanistBaseWorkflow.php b/src/workflow/ArcanistBaseWorkflow.php
index f53936c..4a40979 100644
--- a/src/workflow/ArcanistBaseWorkflow.php
+++ b/src/workflow/ArcanistBaseWorkflow.php
@@ -1408,11 +1408,20 @@ abstract class ArcanistBaseWorkflow {
if (!$project_id) {
$this->projectInfo = array();
} else {
- $this->projectInfo = $this->getConduit()->callMethodSynchronous(
- 'arcanist.projectinfo',
- array(
- 'name' => $project_id,
- ));
+ try {
+ $this->projectInfo = $this->getConduit()->callMethodSynchronous(
+ 'arcanist.projectinfo',
+ array(
+ 'name' => $project_id,
+ ));
+ } catch (ConduitClientException $ex) {
+ // TODO: Implement a proper query method that doesn't throw on
+ // project not found. We just swallow this because some pathways,
+ // like Git with uncommitted changes in a repository with a new
+ // project ID, may attempt to access project information before
+ // the project is created.
+ return array();
+ }
}
}
Event Timeline
epriestley
edited the content of this paste.
(Show Details)
Nov 30 2012, 3:57 PM
2012-11-30 15:57:06 (UTC+0)
Log In to Comment