"Cosmetic" changes in work with error code constants.
This commit is contained in:
parent
0690408dea
commit
bcd46e643f
1 changed files with 15 additions and 15 deletions
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: tomas $
|
Author : $Author: tomas $
|
||||||
Version : $Revision: 1.4 $
|
Version : $Revision: 1.5 $
|
||||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/Validator.php,v $
|
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/Validator.php,v $
|
||||||
|
|
||||||
------------------------------------------------------------------------------*/
|
------------------------------------------------------------------------------*/
|
||||||
|
@ -114,11 +114,11 @@ class Validator{
|
||||||
switch($predxml){
|
switch($predxml){
|
||||||
case'T':
|
case'T':
|
||||||
if(!$this->isChildInFormat($fname, $category))
|
if(!$this->isChildInFormat($fname, $category))
|
||||||
return $this->_err(113, "$category in $fname");
|
return $this->_err(VAL_UNKNOWNE, "$category in $fname");
|
||||||
break;
|
break;
|
||||||
case'A':
|
case'A':
|
||||||
if(!$this->isAttrInFormat($fname, $category))
|
if(!$this->isAttrInFormat($fname, $category))
|
||||||
return $this->_err(114, "$category in $fname");
|
return $this->_err(VAL_UNKNOWNA, "$category in $fname");
|
||||||
break;
|
break;
|
||||||
case'N':
|
case'N':
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -312,18 +312,18 @@ class Validator{
|
||||||
function _err($errno, $par='')
|
function _err($errno, $par='')
|
||||||
{
|
{
|
||||||
$msg = array(
|
$msg = array(
|
||||||
110=>'Wrong root element',
|
VAL_ROOT => 'Wrong root element',
|
||||||
111=>'Required element missing',
|
VAL_NOREQE => 'Required element missing',
|
||||||
112=>'One-of element missing',
|
VAL_NOONEOF => 'One-of element missing',
|
||||||
113=>'Unknown element',
|
VAL_UNKNOWNE => 'Unknown element',
|
||||||
114=>'Unknown attribute',
|
VAL_UNKNOWNA => 'Unknown attribute',
|
||||||
115=>'Not defined',
|
VAL_NOTDEF => 'Not defined',
|
||||||
116=>'Unexpected second object from one-of set',
|
VAL_UNEXPONEOF => 'Unexpected second object from one-of set',
|
||||||
117=>'Unknown format',
|
VAL_FORMAT => 'Unknown format',
|
||||||
118=>'Invalid content',
|
VAL_CONTENT => 'Invalid content',
|
||||||
119=>'Required attribute missing',
|
VAL_NOREQA => 'Required attribute missing',
|
||||||
120=>'Invalid attribute format',
|
VAL_ATTRIB => 'Invalid attribute format',
|
||||||
121=>'Invalid predicate type',
|
VAL_PREDXML => 'Invalid predicate type',
|
||||||
);
|
);
|
||||||
return PEAR::raiseError(
|
return PEAR::raiseError(
|
||||||
"Validator: {$msg[$errno]} #$errno ($par, gunid={$this->gunid})",
|
"Validator: {$msg[$errno]} #$errno ($par, gunid={$this->gunid})",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue