Page MenuHomePhabricator

D19693.diff
No OneTemporary

D19693.diff

diff --git a/support/ArcanistRuntime.php b/support/ArcanistRuntime.php
--- a/support/ArcanistRuntime.php
+++ b/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
Sat, May 11, 10:59 PM (1 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6286915
Default Alt Text
D19693.diff (1 KB)

Event Timeline