# optimole-wp/trunk/vendor/enshrined/svg-sanitize/src/Exceptions/NestingException.php

Optimole – Optimize Images | Convert WebP &amp; AVIF | CDN &amp; Lazy Load | Image Optimization, version trunk. 37 lines.

- Page: https://pluginprobe.com/plugins/optimole-wp/trunk/code/vendor/enshrined/svg-sanitize/src/Exceptions/NestingException.php
- Raw: https://pluginprobe.com/plugins/optimole-wp/trunk/raw/vendor/enshrined/svg-sanitize/src/Exceptions/NestingException.php
- Modified: 2024-09-11T10:30:26+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/optimole-wp/trunk/code/vendor/enshrined/svg-sanitize/src/Exceptions/NestingException.php#L10-L20`.

```php
<?php
namespace enshrined\svgSanitize\Exceptions;

use Exception;

class NestingException extends \Exception
{
    /**
     * @var \DOMElement
     */
    protected $element;

    /**
     * NestingException constructor.
     *
     * @param string           $message
     * @param int              $code
     * @param Exception|null   $previous
     * @param \DOMElement|null $element
     */
    public function __construct($message = "", $code = 0, ?Exception $previous = null, ?\DOMElement $element = null)
    {
        $this->element = $element;
        parent::__construct($message, $code, $previous);
    }

    /**
     * Get the element that caused the exception.
     *
     * @return \DOMElement
     */
    public function getElement()
    {
        return $this->element;
    }
}

```
