403Webshell
Server IP : 15.235.198.142  /  Your IP : 216.73.216.17
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux ballsack 6.8.0-45-generic #45-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 30 12:02:04 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 8.3.6
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/yme/wp-content/plugins/elementor-pro/core/integrations/exceptions/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/yme/wp-content/plugins/elementor-pro/core/integrations/exceptions/exception-base.php
<?php

namespace ElementorPro\Core\Integrations\Exceptions;

use ElementorPro\Plugin;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly
}

abstract class Exception_Base extends \Exception {

	/**
	 * @var string
	 */
	protected $action;

	/**
	 * @var array
	 */
	protected $meta = [];

	/**
	 * Get a formatted message specific to the current exception type.
	 *
	 * @param string $message
	 *
	 * @return string
	 */
	abstract protected function format_message( $message );

	/**
	 * Exception_Base constructor.
	 *
	 * @param string $action - Action name that failed (ideally the class name, e.g. Email::class).
	 * @param string $message - Message to show.
	 * @param array  $meta   - Exception meta data. Used for logging.
	 *
	 */
	public function __construct( $action, $message = '', $meta = [] ) {
		$this->action = $action;
		$this->meta = $meta;

		$message = $this->format_message( $message );

		parent::__construct( $message );
	}

	/**
	 * Log the exception to Elementor's log.
	 *
	 * @return void
	 */
	public function log() {
		Plugin::elementor()->logger->get_logger()->error( $this->getMessage(), [ 'meta' => $this->meta ] );
	}

	/**
	 * Get the error format.
	 *
	 * @return string
	 */
	public function __toString() {
		return sprintf(
			'%s: %s',
			__CLASS__,
			$this->getMessage()
		);
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit