HEX
Server: Apache/2.4.67 (Debian)
System: Linux hosting103 6.1.0-49-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64
User: muzikaecom (1013)
PHP: 8.3.31
Disabled: NONE
Upload Files
File: /home/muzikaecom/muzikae.com/wp-content/plugins/better-wp-security/core/Exception/WP_Error.php
<?php

namespace iThemesSecurity\Exception;

class WP_Error extends \Exception implements Exception {

	/** @var \WP_Error */
	private $error;

	public function __construct( \WP_Error $error, \Exception $previous = null ) {
		$this->error = $error;
		parent::__construct( wp_sprintf( '%l', $error->get_error_messages() ), 0, $previous );
	}

	/**
	 * Create a WP Error instance from an error code and message.
	 *
	 * @param string $code
	 * @param string $message
	 * @param array  $data
	 *
	 * @return static
	 */
	public static function from_code( $code, $message, array $data = [] ) {
		return new static( new \WP_Error( $code, $message, $data ) );
	}

	/**
	 * Get the WP Error instance.
	 *
	 * @return \WP_Error
	 */
	public function get_error() {
		return $this->error;
	}
}