Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
exception.php
1
<?
2
namespace
Bitrix\Sale\Location\Tree
;
3
4
use
Bitrix\Main\Localization\Loc
;
5
6
Loc::loadMessages
(__FILE__);
7
8
class
Exception
extends
\Bitrix\Sale\Location\Exception
9
{
10
public
function
getDefaultMessage
()
11
{
12
return
Loc::getMessage
(
'SALE_TREE_ENTITY_EXCEPTION'
);
13
}
14
15
protected
function
fillMessageAdditions
()
16
{
17
$message =
''
;
18
19
$aInfo = $this->getAdditionalInfo();
20
21
if
(isset($aInfo[
'ID'
]))
22
{
23
$message .=
' (ID = '
.intval($aInfo[
'ID'
]).
')'
;
24
}
25
26
if
(isset($aInfo[
'CODE'
]))
27
{
28
$message .=
' (CODE = '
.intval($aInfo[
'CODE'
]).
')'
;
29
}
30
31
if
(isset($aInfo[
'RIGHT_MARGIN'
]))
32
{
33
$message .=
' (RIGHT_MARGIN = '
.intval($aInfo[
'RIGHT_MARGIN'
]).
')'
;
34
}
35
36
if
(isset($aInfo[
'LEFT_MARGIN'
]))
37
{
38
$message .=
' (LEFT_MARGIN = '
.intval($aInfo[
'LEFT_MARGIN'
]).
')'
;
39
}
40
41
return
$message;
42
}
43
}
44
45
class
NodeNotFoundException
extends
\Bitrix\Sale\Location\Tree\Exception
46
{
47
public
function
getDefaultMessage
()
48
{
49
return
Loc::getMessage
(
'SALE_TREE_ENTITY_NODE_NOT_FOUND_EXCEPTION'
).static::fillMessageAdditions();
50
}
51
}
52
53
class
NodeIncorrectException
extends
\Bitrix\Sale\Location\Tree\Exception
54
{
55
public
function
getDefaultMessage
()
56
{
57
return
'Incorrect LEFT_MARGIN or RIGHT_MARGIN (wrong data given or tree structure integrity seems to be compromised)'
.static::fillMessageAdditions();
58
}
59
}
Bitrix\Main\DB\Exception
Definition
exception.php:11
Bitrix\Main\Localization\Loc
Definition
loc.php:11
Bitrix\Main\Localization\Loc\loadMessages
static loadMessages($file)
Definition
loc.php:64
Bitrix\Main\Localization\Loc\getMessage
static getMessage($code, $replace=null, $language=null)
Definition
loc.php:29
Bitrix\Sale\Location\Tree\Exception
Definition
exception.php:9
Bitrix\Sale\Location\Tree\Exception\getDefaultMessage
getDefaultMessage()
Definition
exception.php:10
Bitrix\Sale\Location\Tree\Exception\fillMessageAdditions
fillMessageAdditions()
Definition
exception.php:15
Bitrix\Sale\Location\Tree\NodeIncorrectException
Definition
exception.php:54
Bitrix\Sale\Location\Tree\NodeIncorrectException\getDefaultMessage
getDefaultMessage()
Definition
exception.php:55
Bitrix\Sale\Location\Tree\NodeNotFoundException
Definition
exception.php:46
Bitrix\Sale\Location\Tree\NodeNotFoundException\getDefaultMessage
getDefaultMessage()
Definition
exception.php:47
Bitrix\Sale\Location\Tree
Definition
exception.php:2
modules
sale
lib
location
tree
exception.php
Создано системой
1.10.0