Merge pull request #1617 from shanethehat/schema-validation-messages
Specific schema validation failure messages (fixes issue #1616)pull/1609/merge
commit
663c47ba25
|
@ -24,6 +24,7 @@ use Composer\Composer;
|
||||||
use Composer\Factory;
|
use Composer\Factory;
|
||||||
use Composer\IO\IOInterface;
|
use Composer\IO\IOInterface;
|
||||||
use Composer\IO\ConsoleIO;
|
use Composer\IO\ConsoleIO;
|
||||||
|
use Composer\Json\JsonValidationException;
|
||||||
use Composer\Util\ErrorHandler;
|
use Composer\Util\ErrorHandler;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -144,7 +145,12 @@ class Application extends BaseApplication
|
||||||
$this->io->write($e->getMessage());
|
$this->io->write($e->getMessage());
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
} catch (JsonValidationException $e) {
|
||||||
|
$errors = ' - ' . implode(PHP_EOL . ' - ', $e->getErrors());
|
||||||
|
$message = $e->getMessage() . ':' . PHP_EOL . $errors;
|
||||||
|
throw new JsonValidationException($message);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->composer;
|
return $this->composer;
|
||||||
|
|
Loading…
Reference in New Issue