/**
  * Constructor.
  * @param ConstraintViolationListInterface $violations
  * @param Exception $previous
  * @param int $code
  */
 public function __construct(ConstraintViolationListInterface $violations, Exception $previous = null, $code = 0)
 {
     $message = '';
     /** @var ConstraintViolationInterface $violation */
     foreach ($violations as $violation) {
         $message .= $violation->getPropertyPath() . ' - ' . $violation->getMessage() . PHP_EOL;
     }
     parent::__construct($message, $previous, $code);
 }
예제 #2
0
 public function __construct(array $errors, $message = null, $logref = null, \Exception $previous = null, $code = 0)
 {
     parent::__construct($message, $previous, $code);
     $this->errors = $errors;
     $this->logref = $logref;
 }
예제 #3
0
 public function __construct(FormInterface $form, $message = null, $logref = null, \Exception $previous = null, $code = 0)
 {
     parent::__construct($message, $previous, $code);
     $this->form = $form;
     $this->logref = $logref;
 }
 /**
  * {@inheritdoc}
  */
 public function __construct($message, $code = 0, \Exception $previous = null)
 {
     parent::__construct($message, $previous, $code);
 }
예제 #5
0
 /**
  * Constructor.
  *
  * @param string     $message  The internal exception message
  * @param \Exception $previous The previous exception
  * @param int        $code     The internal exception code
  */
 public function __construct($message = null, \Exception $previous = null, $code = 0)
 {
     $message = is_null($message) ? 'Malformed JsValidation Request' : $message;
     parent::__construct($message, $previous, $code);
 }
예제 #6
0
 /**
  * @param ConstraintViolationList $violations
  */
 public function __construct(ConstraintViolationList $violations)
 {
     parent::__construct("Supplied data is invalid", $this);
     $this->violations = $violations;
 }
예제 #7
0
 public function __construct(ConstraintViolationListInterface $violationList, $message = null, $logref = null, \Exception $previous = null, $code = 0)
 {
     parent::__construct($message, $previous, $code);
     $this->violationList = $violationList;
     $this->logref = $logref;
 }
예제 #8
0
 /**
  * Constructor
  *
  * @param string     $message Error message
  * @param \Exception $prev    Previous Exception
  */
 public function __construct($message = "Malformed input", $prev = null)
 {
     parent::__construct($message, $prev, Response::HTTP_INTERNAL_SERVER_ERROR);
 }
예제 #9
0
 /**
  * @param \RREST\Error[] $errors   List of errors
  * @param Exception|null $previous
  */
 public function __construct(array $errors, $message = 'Invalid', \Exception $previous = null, $code = 0)
 {
     $this->errors = $errors;
     parent::__construct($message, $previous, $code);
 }
 public function __construct($entityId)
 {
     parent::__construct(sprintf('AuthnRequest received from ServiceProvider with an unknown EntityId: "%s"', $entityId));
 }
 /**
  * @param string $message, array $form
  */
 public function __construct($message, $form = null)
 {
     parent::__construct($message);
     $this->form = $form;
 }
 /**
  * Constructor
  *
  * @param string $operator RQL operator
  */
 public function __construct($operator)
 {
     parent::__construct(sprintf('RQL operator "%s" is not allowed for this request', $operator));
 }
 public function __construct(Form $form = null)
 {
     parent::__construct((string) $form->getErrors(true, false));
 }
예제 #14
0
 /**
  * Constructs a new BrokenPostRequestException.
  *
  * @param string $max_upload_size
  *   The size of the maximum upload size.
  * @param string $message
  *   The internal exception message.
  * @param \Exception $previous
  *   The previous exception.
  * @param int $code
  *   The internal exception code.
  */
 public function __construct($max_upload_size, $message = NULL, \Exception $previous = NULL, $code = 0)
 {
     parent::__construct($message, $previous, $code);
     $this->size = $max_upload_size;
 }
 public function __construct($errors = array())
 {
     parent::__construct("ValidationFailed");
     $this->errors = $errors;
 }
 /**
  * BadRequestConstraintException constructor.
  *
  * @param ConstraintViolationListInterface $violations
  * @param Exception|null                   $previous
  * @param int                              $code
  */
 public function __construct(ConstraintViolationListInterface $violations, Exception $previous = null, $code = 0)
 {
     $this->violations = $violations;
     parent::__construct("Failed constraints", $previous, $code);
 }