Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
executeexception.php
1<?php
3
6
7Loc::loadMessages(__FILE__);
8
16{
17 protected $errCode;
18 protected $method;
19 protected $needLink = false;
20 const API_DESC_PAGE = 'https://new.vk.com/dev/errors';
21
22
23 public function __construct($message = "", $errCode = "", $method = "", \Exception $previous = NULL)
24 {
25 parent::__construct($message, 0, '', 0, $previous);
26 $this->errCode = $errCode;
27 $this->method = $method;
28 }
29
35 public function getFullMessage()
36 {
37 $newMessage = Loc::getMessage("VK_ERRORS_INTRO") . "\n";
38
39 if ($this->errCode)
40 $newMessage .= Loc::getMessage("VK_ERROR_CODE") . ": \"" . $this->errCode . "\". ";
41
42 $newMessage .= Loc::getMessage("VK_ERROR_TEXT") . ": \"" . $this->message . "\".";
43
44 if ($this->method)
45 $newMessage .= " " . Loc::getMessage("VK_ERROR_IN_METHOD") . ": " . $this->method . ".";
46
47// only for vk api errors
48 if ($this->errCode)
49 $newMessage .= "\n" . Loc::getMessage("VK_ERROR_ERRORS_INFO") . self::API_DESC_PAGE;
50
51 return $newMessage;
52 }
53}
static loadMessages($file)
Definition loc.php:64
static getMessage($code, $replace=null, $language=null)
Definition loc.php:29
__construct($message="", $errCode="", $method="", \Exception $previous=NULL)