| Server IP : 195.130.67.5 / Your IP : 216.73.217.154 Web Server : Microsoft-IIS/10.0 System : Windows NT WEBSERVER1 10.0 build 17763 (Windows Server 2016) i586 User : IUSR ( 0) PHP Version : 7.4.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/inetpub/wwwroot/prosvasi/wp-content/plugins/wp-statistics/src/Exception/ |
Upload File : |
<?php
namespace WP_Statistics\Exception;
use Exception;
use WP_Statistics;
class LogException extends Exception
{
public function __construct($message, $code = 0, Exception $previous = null)
{
parent::__construct($message, $code, $previous);
WP_Statistics::log($this->generateLogMessage($message, $code), 'error');
}
private function generateLogMessage($message, $code)
{
return sprintf(
/* translators: %1$d: number value, %2$s: string value, %3$s: string value, %4$d: number value */
__('Exception occurred: [Code %1$d] %2$s at %3$s:%4$d', 'wp-statistics'),
$code,
$message,
$this->getFile(),
$this->getLine()
);
}
}