JsonValidationException.php 704 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /*
  3. * This file is part of Composer.
  4. *
  5. * (c) Nils Adermann <naderman@naderman.de>
  6. * Jordi Boggiano <j.boggiano@seld.be>
  7. *
  8. * For the full copyright and license information, please view the LICENSE
  9. * file that was distributed with this source code.
  10. */
  11. namespace Composer\Json;
  12. use Exception;
  13. /**
  14. * @author Jordi Boggiano <j.boggiano@seld.be>
  15. */
  16. class JsonValidationException extends Exception
  17. {
  18. protected $errors;
  19. public function __construct($message, $errors = array(), Exception $previous = null)
  20. {
  21. $this->errors = $errors;
  22. parent::__construct($message, 0, $previous);
  23. }
  24. public function getErrors()
  25. {
  26. return $this->errors;
  27. }
  28. }