Page MenuHomePhabricator

D19693.id47047.diff
No OneTemporary

D19693.id47047.diff

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

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)

Event Timeline