Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/sale/lib/tradingplatform/vk/ |
Upload File : |
<?php namespace Bitrix\Sale\TradingPlatform\Vk; use Bitrix\Main\SystemException; use Bitrix\Main\Localization\Loc; Loc::loadMessages(__FILE__); /** * Class ExecuteException * Throw various errors occuring during vk-export * * @package Bitrix\Sale\TradingPlatform\Vk */ class ExecuteException extends SystemException { protected $errCode; protected $method; protected $needLink = false; const API_DESC_PAGE = 'https://new.vk.com/dev/errors'; public function __construct($message = "", $errCode = "", $method = "", \Exception $previous = NULL) { parent::__construct($message, 0, '', 0, $previous); $this->errCode = $errCode; $this->method = $method; } /** * Return formatted message for showing * * @return string */ public function getFullMessage() { $newMessage = Loc::getMessage("VK_ERRORS_INTRO") . "\n"; if ($this->errCode) $newMessage .= Loc::getMessage("VK_ERROR_CODE") . ": \"" . $this->errCode . "\". "; $newMessage .= Loc::getMessage("VK_ERROR_TEXT") . ": \"" . $this->message . "\"."; if ($this->method) $newMessage .= " " . Loc::getMessage("VK_ERROR_IN_METHOD") . ": " . $this->method . "."; // only for vk api errors if ($this->errCode) $newMessage .= "\n" . Loc::getMessage("VK_ERROR_ERRORS_INFO") . self::API_DESC_PAGE; return $newMessage; } }