# ivyforms/0.8.1/backend/src/Common/Exceptions/ForbiddenException.php

The Innovative Form Builder – IvyForms, version 0.8.1. 40 lines.

- Page: https://pluginprobe.com/plugins/ivyforms/0.8.1/code/backend/src/Common/Exceptions/ForbiddenException.php
- Raw: https://pluginprobe.com/plugins/ivyforms/0.8.1/raw/backend/src/Common/Exceptions/ForbiddenException.php
- Modified: 2026-01-29T13:48:54+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/ivyforms/0.8.1/code/backend/src/Common/Exceptions/ForbiddenException.php#L10-L20`.

```php
<?php

/**
 * @copyright © Melograno Venture Studio. All rights reserved.
 * @licence   See LICENCE.md for license details.
 */

namespace IvyForms\Common\Exceptions;

// phpcs:disable PSR1.Files.SideEffects
if (!defined('ABSPATH')) {
    exit; // Exit if accessed directly
}

use Exception;

/**
 * Class ForbiddenException
 *
 * @package IvyForms\Common\Exceptions
 */
class ForbiddenException extends Exception
{
    /**
     * ForbiddenException constructor.
     *
     * @param string         $message
     * @param int            $code
     * @param Exception|null $previous
     */
    public function __construct($message = 'forbidden', $code = 0, Exception $previous = null)
    {
        parent::__construct($message, $code, $previous);
        wp_die(
            esc_html__('You do not have permission to access this page.', 'ivyforms'),
            403
        );
    }
}

```
