cvs: pear-core /PEAR/PackageFile v1.php

From: Date: Thu, 28 Oct 2004 22:34:01 +0000
Subject: cvs: pear-core /PEAR/PackageFile v1.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-core+get-1180@lists.php.net to get a copy of this message
cellog Thu Oct 28 18:34:01 2004 EDT Modified files: /pear-core/PEAR/PackageFile v1.php Log: adjust error messages to be more consistent http://cvs.php.net/diff.php/pear-core/PEAR/PackageFile/v1.php?r1=1.25&r2=1.26&ty=u Index: pear-core/PEAR/PackageFile/v1.php diff -u pear-core/PEAR/PackageFile/v1.php:1.25 pear-core/PEAR/PackageFile/v1.php:1.26 --- pear-core/PEAR/PackageFile/v1.php:1.25 Thu Oct 28 00:01:53 2004 +++ pear-core/PEAR/PackageFile/v1.php Thu Oct 28 18:34:00 2004 @@ -295,7 +295,7 @@ if (!class_exists('PEAR_ErrorStack')) { include_once 'PEAR/ErrorStack.php'; } - $this->_stack = &new PEAR_ErrorStack('PEAR_PackageFile'); + $this->_stack = &new PEAR_ErrorStack('PEAR_PackageFile_v1'); $this->_stack->setErrorMessageTemplate($this->_getErrorMessage()); $this->_isValid = false; } @@ -853,11 +853,11 @@ PEAR_PACKAGEFILE_ERROR_NO_FILEROLE => 'File "%file%" has no role, expecting one of "%roles%"', PEAR_PACKAGEFILE_ERROR_INVALID_PHPFILE => - 'Parser error: Invalid PHP file "%file%"', + 'Parser error: invalid PHP found in file "%file%"', PEAR_PACKAGEFILE_ERROR_NO_PNAME_PREFIX => 'in %file%: %type% "%name%" not prefixed with package name "%package%"', PEAR_PACKAGEFILE_ERROR_INVALID_FILE => - 'Parser error: Invalid PHP file %file%', + 'Parser error: invalid PHP file "%file%"', PEAR_PACKAGEFILE_ERROR_CHANNELVAL => 'Channel validator error: field "%field%" - %reason%', PEAR_PACKAGEFILE_ERROR_PHP5 => @@ -1186,7 +1186,8 @@ $interface = true; case T_CLASS: if (($current_class_level != -1) || ($current_function_level != -1)) { - $this->_validateError(PEAR_PACKAGEFILE_ERROR_INVALID_FILE, array('file' => $file)); + $this->_validateError(PEAR_PACKAGEFILE_ERROR_INVALID_PHPFILE, + array('file' => $file)); return false; } case T_FUNCTION: @@ -1248,7 +1249,8 @@ continue 2; case T_DOUBLE_COLON: if (!($tokens[$i - 1][0] == T_WHITESPACE || $tokens[$i - 1][0] == T_STRING)) { - $this->_validateError(PEAR_PACKAGEFILE_ERROR_INVALID_FILE, array('file' => $file)); + $this->_validateError(PEAR_PACKAGEFILE_ERROR_INVALID_PHPFILE, + array('file' => $file)); return false; } $class = $tokens[$i - 1][1];

« previous php.pear.core (#1180) next »