|
@@ -24,6 +24,7 @@ use Composer\Composer;
|
|
|
use Composer\Factory;
|
|
|
use Composer\IO\IOInterface;
|
|
|
use Composer\IO\ConsoleIO;
|
|
|
+use Composer\Json\JsonValidationException;
|
|
|
use Composer\Util\ErrorHandler;
|
|
|
|
|
|
/**
|
|
@@ -144,7 +145,12 @@ class Application extends BaseApplication
|
|
|
$this->io->write($e->getMessage());
|
|
|
exit(1);
|
|
|
}
|
|
|
+ } catch (JsonValidationException $e) {
|
|
|
+ $errors = ' - ' . implode(PHP_EOL . ' - ', $e->getErrors());
|
|
|
+ $message = $e->getMessage() . ':' . PHP_EOL . $errors;
|
|
|
+ throw new JsonValidationException($message);
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
|
|
|
return $this->composer;
|