Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13973196
D19693.id47047.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D19693.id47047.diff
View Options
Index: support/ArcanistRuntime.php
===================================================================
--- support/ArcanistRuntime.php
+++ support/ArcanistRuntime.php
@@ -3,9 +3,14 @@
final class ArcanistRuntime {
public function execute(array $argv) {
- $err = $this->checkEnvironment();
- if ($err) {
- return $err;
+
+ try {
+ $this->checkEnvironment();
+ } catch (Exception $ex) {
+ echo "CONFIGURATION ERROR\n\n";
+ echo $ex->getMessage();
+ echo "\n\n";
+ return 1;
}
PhutilTranslator::getInstance()
@@ -109,7 +114,8 @@
'minimum supported version ("%s"). Update PHP to continue.',
$cur_version,
$min_version);
- return $this->fatalError($message);
+
+ throw new Exception($message);
}
if ($is_windows) {
@@ -190,17 +196,9 @@
$problems[] = "PHP was built with this configure command:\n\n{$config}";
}
$problems = implode("\n\n", $problems);
- return $this->fatalError($problems);
- }
- return 0;
- }
-
- private function fatalError($message) {
- echo "CONFIGURATION ERROR\n\n";
- echo $message;
- echo "\n\n";
- return 1;
+ throw new Exception($problems);
+ }
}
private function loadConfiguration(PhutilArgumentParser $args) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Oct 18, 11:38 PM (2 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6729203
Default Alt Text
D19693.id47047.diff (1 KB)
Attached To
Mode
D19693: [Wilds] Slightly simplify fatal handling during "arc" setup
Attached
Detach File
Event Timeline
Log In to Comment