PHP 7.4.33
Preview: RejectionException.php Size: 1.24 KB
/home/godevadmin/www/admin/vendor/aws/GuzzleHttp/Promise/RejectionException.php

<?php

namespace GuzzleHttp\Promise;

/**
 * A special exception that is thrown when waiting on a rejected promise.
 *
 * The reason value is available via the getReason() method.
 */
class RejectionException extends \RuntimeException
{
    /** @var mixed Rejection reason. */
    private $reason;

    /**
     * @param mixed  $reason      Rejection reason.
     * @param string $description Optional description
     */
    public function __construct($reason, $description = null)
    {
        $this->reason = $reason;

        $message = 'The promise was rejected';

        if ($description) {
            $message .= ' with reason: ' . $description;
        } elseif (is_string($reason)
            || (is_object($reason) && method_exists($reason, '__toString'))
        ) {
            $message .= ' with reason: ' . $this->reason;
        } elseif ($reason instanceof \JsonSerializable) {
            $message .= ' with reason: '
                . json_encode($this->reason, JSON_PRETTY_PRINT);
        }

        parent::__construct($message);
    }

    /**
     * Returns the rejection reason.
     *
     * @return mixed
     */
    public function getReason()
    {
        return $this->reason;
    }
}

Directory Contents

Dirs: 0 × Files: 18

Name Size Perms Modified Actions
397 B lrwxrwxr-x 2024-06-18 20:12:04
Edit Download
193 B lrwxrwxr-x 2024-06-18 20:12:04
Edit Download
4.41 KB lrwxrwxr-x 2024-06-18 20:12:04
Edit Download
2.14 KB lrwxrwxr-x 2024-06-18 20:12:04
Edit Download
2.91 KB lrwxrwxr-x 2024-06-18 20:12:04
Edit Download
8.08 KB lrwxrwxr-x 2024-06-18 20:12:04
Edit Download
2.03 KB lrwxrwxr-x 2024-06-18 20:12:04
Edit Download
10.25 KB lrwxrwxr-x 2024-06-18 20:12:06
Edit Download
173 B lrwxrwxr-x 2024-06-18 20:12:06
Edit Download
1.02 KB lrwxrwxr-x 2024-06-18 20:12:04
Edit Download
9.01 KB lrwxrwxr-x 2024-06-18 20:12:04
Edit Download
2.88 KB lrwxrwxr-x 2024-06-18 20:12:04
Edit Download
260 B lrwxrwxr-x 2024-06-18 20:12:06
Edit Download
2.32 KB lrwxrwxr-x 2024-06-18 20:12:06
Edit Download
1.24 KB lrwxrwxr-x 2024-06-18 20:12:06
Edit Download
1.96 KB lrwxrwxr-x 2024-06-18 20:12:06
Edit Download
457 B lrwxrwxr-x 2024-06-18 20:12:06
Edit Download
8.77 KB lrwxrwxr-x 2024-06-18 20:12:06
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).