<?php

namespace Easymailing\App\Api\Exception;

class ValidationException extends HttpException
{
	private $violations;

	public function __construct($message = "", $code = 422, \Throwable $previous = null, array $violations = [])
	{
		$this->violations = $violations;
		parent::__construct($message, $code, $previous);
	}

	public function getViolations(): array
	{
		return $this->violations;
	}
}
