Yoast\WP\SEO\AI_HTTP_Request\Domain\Exceptions

Remote_Request_Exception{}abstractYoast 1.0└─ Exception

Class Remote_Request_Exception

Хуков нет.

Использование

$Remote_Request_Exception = new Remote_Request_Exception();
// use class methods

Методы

  1. public __construct( $message = '', $code = 0, $error_identifier = '', ?Throwable $previous = null )
  2. public get_error_identifier()
  3. ERROR: no method name found on line `$this->error_identifier = (string) $error_identifier;`
  4. ERROR: no method name found on line `}`

Код Remote_Request_Exception{} Yoast 27.7

abstract class Remote_Request_Exception extends Exception {

	/**
	 * A string error code that can be used to identify a particular type of error.
	 *
	 * @var string
	 */
	private $error_identifier;

	/**
	 * Constructor.
	 *
	 * @param string         $message          The error message.
	 * @param int            $code             The error status code.
	 * @param string         $error_identifier The error code identifier, used to identify a type of error.
	 * @param Throwable|null $previous         The previously thrown exception.
	 */
	public function __construct( $message = '', $code = 0, $error_identifier = '', ?Throwable $previous = null ) {
		parent::__construct( $message, $code, $previous );
		$this->error_identifier = (string) $error_identifier;
	}

	/**
	 * Returns the error identifier.
	 *
	 * @return string The error identifier.
	 */
	public function get_error_identifier(): string {
		return $this->error_identifier;
	}
}