<?php
/**
 * Validation Exception
 *
 * @package AIPT\Core\Exceptions
 * @since 2.4.0
 */

namespace AIPT\Core\Exceptions;

class ValidationException extends \Exception {

    private $errors = array();

    public function __construct( string $message = '', array $errors = array(), int $code = 400, ?\Throwable $previous = null ) {
        parent::__construct( $message, $code, $previous );
        $this->errors = $errors;
    }

    public function getErrors(): array {
        return $this->errors;
    }
}
