Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
MessageError.php
1<?php
2
4
7
8class MessageError extends Error
9{
10 public const
11 WRONG_PARAMETER = 'WRONG_PARAMETER',
12 WRONG_SENDER = 'WRONG_SENDER',
13 EMPTY_MESSAGE = 'EMPTY_MESSAGE',
14 NOTIFY_MODULE = 'NOTIFY_MODULE',
15 NOTIFY_EVENT = 'NOTIFY_EVENT',
16 NOTIFY_TYPE = 'NOTIFY_TYPE',
17 NOTIFY_BUTTONS = 'NOTIFY_BUTTONS',
18 MESSAGE_NOT_FOUND = 'MESSAGE_NOT_FOUND',
19 MESSAGE_DUPLICATED_BY_UUID = 'MESSAGE_DUPLICATED_BY_UUID',
20 MESSAGE_IS_ALREADY_FAVORITE = 'MESSAGE_IS_ALREADY_FAVORITE',
21 MESSAGE_IS_ALREADY_PIN = 'MESSAGE_IS_ALREADY_PIN',
22 MESSAGE_IS_ALREADY_IN_REMINDERS = 'MESSAGE_IS_ALREADY_IN_REMINDERS',
23 MESSAGE_ACCESS_ERROR = 'MESSAGE_ACCESS_ERROR',
24 MESSAGE_TOO_OLD_FOR_DELETION = 'MESSAGE_TOO_OLD_FOR_DELETION',
25 DIFFERENT_CHAT_ERROR = 'MESSAGES_IN_DIFFERENT_CHAT_ERROR',
26 TOO_MANY_MESSAGES = 'TOO_MANY_MESSAGES',
27 SENDING_FAILED = 'SENDING_FAILED',
28 MARK_FAILED = 'MESSAGE_MARK_FAILED',
29 INFORM_USER_CONTEXT_ERROR = 'INFORM_USER_CONTEXT_ERROR',
30 INFORM_VIEWED_ERROR = 'INFORM_VIEWED_ERROR',
31 INFORM_TIMEOUT_ERROR = 'INFORM_TIMEOUT_ERROR',
32 INFORM_USER_STATUS_ERROR = 'INFORM_USER_STATUS_ERROR',
33 REPLY_ERROR = 'REPLY_ERROR',
34 PARAMS_ERROR = 'PARAMS_ERROR',
35 WRONG_UUID = 'WRONG_UUID'
36 ;
37
38 protected function loadErrorMessage($code, $replacements): string
39 {
40 return Loc::getMessage("ERROR_MESSAGE_{$code}", $replacements) ?: '';
41 }
42
43 protected function loadErrorDescription($code, $replacements): string
44 {
45 return Loc::getMessage("ERROR_MESSAGE_{$code}_DESC", $replacements) ?: '';
46 }
47}
loadErrorMessage($code, $replacements)
loadErrorDescription($code, $replacements)
static getMessage($code, $replace=null, $language=null)
Definition loc.php:29