Skip to content

Instantly share code, notes, and snippets.

@sahibalejandro
Created September 3, 2014 22:36
Show Gist options
  • Save sahibalejandro/f22bd30940014456bf76 to your computer and use it in GitHub Desktop.
Save sahibalejandro/f22bd30940014456bf76 to your computer and use it in GitHub Desktop.
Class InputValidatorException
<?php namespace Acme\Validators;
use Illuminate\Support\MessageBag;
/**
* Class InputValidatorException
* @package Acme\Validators
*/
class InputValidatorException extends \Exception {
/**
* @var MessageBag
*/
protected $errors;
/**
* @param MessageBag $errors
* @param string $message
* @param int $code
* @param \Exception $previous
*/
function __construct(MessageBag $errors, $message = '', $code = 0, \Exception $previous = null)
{
$this->errors = $errors;
parent::__construct($message, $code, $previous);
}
/**
* @return MessageBag
*/
public function getErrors()
{
return $this->errors;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment