Author: dr Date: Fri Jan 11 10:43:50 2008 New Revision: 7122 Log: - Added an optional argument to the ezcBaseValueException constructor to allow the exception to be used for non-property/setting type violations as well.
Modified: trunk/Base/ChangeLog trunk/Base/src/exceptions/value.php Modified: trunk/Base/ChangeLog ============================================================================== --- trunk/Base/ChangeLog [iso-8859-1] (original) +++ trunk/Base/ChangeLog [iso-8859-1] Fri Jan 11 10:43:50 2008 @@ -5,6 +5,8 @@ - Fixed issue #12316: Numbers in own component prefix not possible. - Fixed issue #12329: ezcBaseFeatures::findExecutableInPath's return value does not include the extension to the executable at the end on Windows. +- Added an optional argument to the ezcBaseValueException constructor to allow + the exception to be used for non-property/setting type violations as well. 1.4 - Monday 17 December 2007 Modified: trunk/Base/src/exceptions/value.php ============================================================================== --- trunk/Base/src/exceptions/value.php [iso-8859-1] (original) +++ trunk/Base/src/exceptions/value.php [iso-8859-1] Fri Jan 11 10:43:50 2008 @@ -23,15 +23,16 @@ * wrong with. * @param mixed $value The value that the option was tried to be set too. * @param string $expectedValue A string explaining the allowed type and value range. + * @param string $variableType What type of variable was tried to be set (setting, argument). */ - function __construct( $settingName, $value, $expectedValue = null ) + function __construct( $settingName, $value, $expectedValue = null, $variableType = 'setting' ) { $type = gettype( $value ); if ( in_array( $type, array( 'array', 'object', 'resource' ) ) ) { $value = serialize( $value ); } - $msg = "The value '{$value}' that you were trying to assign to setting '{$settingName}' is invalid."; + $msg = "The value '{$value}' that you were trying to assign to $variableType '{$settingName}' is invalid."; if ( $expectedValue ) { $msg .= " Allowed values are: " . $expectedValue . '.'; -- svn-components mailing list svn-components@lists.ez.no http://lists.ez.no/mailman/listinfo/svn-components