Priority File Manager

📁 public_html
Base Directory:
/home/ecedu/public_html/wp-includes/Requests/src
NameTypeSizeActions
📁 .. Folder -
📁 Auth Folder -
📄 Auth.php File 860
Edit Download
📄 Autoload.php File 9335
Edit Download
📄 Capability.php File 652
Edit Download
📁 Cookie Folder -
📄 Cookie.php File 15389
Edit Download
📁 Exception Folder -
📄 Exception.php File 1114
Edit Download
📄 HookManager.php File 709
Edit Download
📄 Hooks.php File 3032
Edit Download
📄 IdnaEncoder.php File 12435
Edit Download
📄 Ipv6.php File 5639
Edit Download
📄 Iri.php File 29622
Edit Download
📄 Port.php File 1505
Edit Download
📁 Proxy Folder -
📄 Proxy.php File 867
Edit Download
📄 Requests.php File 34001
Edit Download
📁 Response Folder -
📄 Response.php File 4281
Edit Download
📄 Session.php File 9107
Edit Download
📄 Ssl.php File 5425
Edit Download
📁 Transport Folder -
📄 Transport.php File 1544
Edit Download
📁 Utility Folder -

View File: Exception.php

<?php
/**
 * Exception for HTTP requests
 *
 * @package Requests\Exceptions
 */

namespace WpOrg\Requests;

use Exception as PHPException;

/**
 * Exception for HTTP requests
 *
 * @package Requests\Exceptions
 */
class Exception extends PHPException {
	/**
	 * Type of exception
	 *
	 * @var string
	 */
	protected $type;

	/**
	 * Data associated with the exception
	 *
	 * @var mixed
	 */
	protected $data;

	/**
	 * Create a new exception
	 *
	 * @param string $message Exception message
	 * @param string $type Exception type
	 * @param mixed $data Associated data
	 * @param integer $code Exception numerical code, if applicable
	 */
	public function __construct($message, $type, $data = null, $code = 0) {
		parent::__construct($message, $code);

		$this->type = $type;
		$this->data = $data;
	}

	/**
	 * Like {@see \Exception::getCode()}, but a string code.
	 *
	 * @codeCoverageIgnore
	 * @return string
	 */
	public function getType() {
		return $this->type;
	}

	/**
	 * Gives any relevant data
	 *
	 * @codeCoverageIgnore
	 * @return mixed
	 */
	public function getData() {
		return $this->data;
	}
}