# give/4.16.9/src/DonationForms/Exceptions/DonationFormFieldErrorsException.php

GiveWP – Donation Plugin and Fundraising Platform, version 4.16.9. 36 lines.

- Page: https://pluginprobe.com/plugins/give/4.16.9/code/src/DonationForms/Exceptions/DonationFormFieldErrorsException.php
- Raw: https://pluginprobe.com/plugins/give/4.16.9/raw/src/DonationForms/Exceptions/DonationFormFieldErrorsException.php
- Modified: 2023-10-16T17:55:46+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/give/4.16.9/code/src/DonationForms/Exceptions/DonationFormFieldErrorsException.php#L10-L20`.

```php
<?php

namespace Give\DonationForms\Exceptions;

use Give\Framework\Exceptions\Contracts\LoggableException;
use Give\Framework\Exceptions\Traits\Loggable;
use Throwable;
use WP_Error;

class DonationFormFieldErrorsException extends \Exception implements LoggableException
{
    use Loggable;

    /**
     * @var WP_Error
     */
    protected $error;

    /**
     * @since 3.0.0
     */
    public function __construct(WP_Error $error, Throwable $previous = null)
    {
        parent::__construct('Form field validation error', 0, $previous);
        $this->error = $error;
    }

    /**
     * @since 3.0.0
     */
    public function getError(): WP_Error
    {
        return $this->error;
    }
}

```
