Uname:Linux hosting.cormo.systems 5.15.0-179-generic #189-Ubuntu SMP Tue May 5 18:20:56 UTC 2026 x86_64

403WebShell
403Webshell
Server IP : 78.24.162.143  /  Your IP : 216.73.217.150
Web Server : Apache
System : Linux hosting.cormo.systems 5.15.0-179-generic #189-Ubuntu SMP Tue May 5 18:20:56 UTC 2026 x86_64
User : web63 ( 5058)
PHP Version : 7.4.33
Disable Function : create_functions,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/clients/client34/web63/web/wp-content/plugins/pods/tribe-common/src/Tribe/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/clients/client34/web63/web/wp-content/plugins/pods/tribe-common/src/Tribe/Exception.php
<?php


/**
 * Class Tribe__Exception
 *
 * Handles exceptions to log when not in debug mode.
 */
class Tribe__Exception extends Exception {

	/**
	 * @var Exception
	 */
	private $original_exception;

	/**
	 * Tribe__Exception constructor.
	 *
	 * @param Exception $original_exception
	 */
	public function __construct( Exception $original_exception ) {
		$this->original_exception = $original_exception;
	}

	/**
	 * Handles the exception throwing the original when debugging (`WP_DEBUG` defined and `true`)
	 * or quietly logging when `WP_DEBUG` is `false` or not set.
	 *
	 * @return bool  `true` if the message was logged, `false` otherwise.
	 *
	 * @throws Exception
	 */
	public function handle() {
		$debug = defined( 'WP_DEBUG' ) && WP_DEBUG;

		if ( $debug ) {
			$this->throw_original_exception();
		}

		return $this->log_original_exception_message();
	}

	/**
	 * @return string
	 */
	private function get_log_type_for_exception_code( $code ) {
		$map = array(
			// @todo [BTRIA-583]: Let's add a decent exception code to log type map here.
		);

		return isset( $map[ $code ] ) ? $map[ $code ] : Tribe__Log::ERROR;
	}

	/**
	 * Throws the original exception.
	 *
	 * Provided as a manual override over the default `WP_DEBUG` dependent behaviour.
	 *
	 * @see Tribe__Exception::handle()
	 *
	 * @throws Exception
	 */
	public function throw_original_exception() {
		throw  $this->original_exception;
	}

	/**
	 * Logs the original exception message.
	 *
	 * Provided as a manual override over the default `WP_DEBUG` dependent behaviour.
	 *
	 * @see Tribe__Exception::handle()
	 *
	 * @return bool  `true` if the message was logged, `false` otherwise.
	 */
	private function log_original_exception_message() {
		if ( ! class_exists( 'Tribe__Log' ) ) {
			return false;
		}

		$logger   = new Tribe__Log();
		$message  = $this->original_exception->getMessage();
		$log_type = $this->get_log_type_for_exception_code( $this->original_exception->getCode() );
		$src      = $this->original_exception->getFile() . ':' . $this->original_exception->getLine();

		$logger->log( $message, $log_type, $src );

		return true;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit