2012-03-05 22:24:59 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This file is part of Composer.
|
|
|
|
*
|
|
|
|
* (c) Nils Adermann <naderman@naderman.de>
|
|
|
|
* Jordi Boggiano <j.boggiano@seld.be>
|
|
|
|
*
|
|
|
|
* For the full copyright and license information, please view the LICENSE
|
|
|
|
* file that was distributed with this source code.
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace Composer\Json;
|
|
|
|
|
|
|
|
use Exception;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @author Jordi Boggiano <j.boggiano@seld.be>
|
|
|
|
*/
|
|
|
|
class JsonValidationException extends Exception
|
|
|
|
{
|
|
|
|
protected $errors;
|
|
|
|
|
2012-07-02 09:32:26 +00:00
|
|
|
public function __construct($message, $errors = array())
|
2012-03-05 22:24:59 +00:00
|
|
|
{
|
|
|
|
$this->errors = $errors;
|
2012-07-02 09:32:26 +00:00
|
|
|
parent::__construct($message);
|
2012-03-05 22:24:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function getErrors()
|
|
|
|
{
|
|
|
|
return $this->errors;
|
|
|
|
}
|
|
|
|
}
|