# optimole-wp/4.2.5/vendor/codeinwp/optimole-sdk/src/Exception/UploadLimitException.php

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

- Page: https://pluginprobe.com/plugins/optimole-wp/4.2.5/code/vendor/codeinwp/optimole-sdk/src/Exception/UploadLimitException.php
- Raw: https://pluginprobe.com/plugins/optimole-wp/4.2.5/raw/vendor/codeinwp/optimole-sdk/src/Exception/UploadLimitException.php
- Modified: 2024-07-29T13:49:02+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/4.2.5/code/vendor/codeinwp/optimole-sdk/src/Exception/UploadLimitException.php#L10-L20`.

```php
<?php

declare(strict_types=1);

/*
 * This file is part of Optimole PHP SDK.
 *
 * (c) Optimole Team <friends@optimole.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Optimole\Sdk\Exception;

use Optimole\Sdk\ValueObject\OffloadUsage;

class UploadLimitException extends UploadApiException
{
    /**
     * The offload service usage.
     */
    private OffloadUsage $usage;

    /**
     * Constructor.
     */
    public function __construct(OffloadUsage $usage, string $message = '', int $code = 0, ?\Throwable $previous = null)
    {
        parent::__construct($message, $code, $previous);

        $this->usage = $usage;
    }

    /**
     * Get the offload service usage.
     */
    public function getUsage(): OffloadUsage
    {
        return $this->usage;
    }
}

```
