Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
ChatError.php
1<?php
2
3namespace Bitrix\Im\V2\Chat;
4
7
8class ChatError extends Error
9{
10 public const
11 WRONG_TYPE = 'WRONG_MESSAGE_TYPE',
12 WRONG_PARAMETER = 'WRONG_PARAMETER',
13 WRONG_SENDER = 'WRONG_SENDER',
14 WRONG_RECIPIENT = 'WRONG_RECIPIENT',
15 WRONG_TARGET_CHAT = 'WRONG_TARGET_CHAT',
16 WRONG_COLOR = 'WRONG_COLOR',
17 WRONG_PARENT_CHAT = 'WRONG_PARENT_CHAT',
18 WRONG_PARENT_MESSAGE = 'WRONG_PARENT_MESSAGE',
19 WRONG_DISAPPEARING_DURATION = 'WRONG_DISAPPEARING_DURATION',
20 ALREADY_DISAPPEARING = 'ALREADY_DISAPPEARING',
21 ACCESS_DENIED = 'ACCESS_DENIED',
22 NOT_FOUND = 'NOT_FOUND',
23 BEFORE_SEND_EVENT = 'EVENT_MESSAGE_SEND',
24 FROM_OTHER_MODULE = 'FROM_OTHER_MODULE',
25 CREATION_ERROR = 'CREATION_ERROR',
26 ID_EMPTY_ERROR = 'ID_EMPTY_ERROR',
27 INVALID_PIN_POSITION = 'INVALID_PIN_POSITION',
28 MAX_PINNED_CHATS_ERROR = 'MAX_PINNED_CHATS_ERROR',
29 USER_ID_EMPTY_ERROR = 'USER_ID_EMPTY_ERROR',
30 IMBOT_NOT_INSTALLED = 'IMBOT_NOT_INSTALLED',
31 COPILOT_NOT_INSTALLED = 'COPILOT_NOT_INSTALLED',
32 TASK_ACCESS_ERROR = 'TASK_ACCESS_ERROR'
33 ;
34
35 protected function loadErrorMessage($code, $replacements): string
36 {
37 return Loc::getMessage("ERROR_CHAT_{$code}", $replacements) ?: '';
38 }
39
40 protected function loadErrorDescription($code, $replacements): string
41 {
42 return Loc::getMessage("ERROR_CHAT_{$code}_DESC", $replacements) ?: '';
43 }
44}
loadErrorMessage($code, $replacements)
Definition ChatError.php:35
loadErrorDescription($code, $replacements)
Definition ChatError.php:40
static getMessage($code, $replace=null, $language=null)
Definition loc.php:29