Author: Sebastian Bergmann
Date: 2007-05-06 10:20:11 +0200 (Sun, 06 May 2007)
New Revision: 5070
Log:
- InvalidArgumentException -> ezcBaseValueException
Modified:
trunk/Workflow/src/nodes/variables/input.php
trunk/Workflow/src/nodes/variables/set.php
trunk/Workflow/src/nodes/variables/unset.php
trunk/Workflow/src/workflow.php
trunk/Workflow/tests/node_test.php
trunk/Workflow/tests/workflow_test.php
Modified: trunk/Workflow/src/nodes/variables/input.php
===================================================================
--- trunk/Workflow/src/nodes/variables/input.php 2007-05-05 20:02:55 UTC
(rev 5069)
+++ trunk/Workflow/src/nodes/variables/input.php 2007-05-06 08:20:11 UTC
(rev 5070)
@@ -20,13 +20,15 @@
* Constructor.
*
* @param mixed $configuration
- * @throws InvalidArgumentException
+ * @throws ezcBaseValueException
*/
public function __construct( $configuration = '' )
{
if ( !is_array( $configuration ) )
{
- throw new InvalidArgumentException;
+ throw new ezcBaseValueException(
+ 'configuration', $configuration, 'array'
+ );
}
$tmp = array();
@@ -37,7 +39,9 @@
{
if ( !is_string( $value ) )
{
- throw new InvalidArgumentException;
+ throw new ezcBaseValueException(
+ 'workflow variable name', $value, 'string'
+ );
}
$variable = $value;
@@ -47,7 +51,9 @@
{
if ( !is_object( $value ) || !$value instanceof
ezcWorkflowCondition )
{
- throw new InvalidArgumentException;
+ throw new ezcBaseValueException(
+ 'workflow variable condition', $value,
'ezcWorkflowCondition'
+ );
}
$variable = $key;
Modified: trunk/Workflow/src/nodes/variables/set.php
===================================================================
--- trunk/Workflow/src/nodes/variables/set.php 2007-05-05 20:02:55 UTC (rev
5069)
+++ trunk/Workflow/src/nodes/variables/set.php 2007-05-06 08:20:11 UTC (rev
5070)
@@ -20,13 +20,15 @@
* Constructor.
*
* @param mixed $configuration
- * @throws InvalidArgumentException
+ * @throws ezcBaseValueException
*/
public function __construct( $configuration = '' )
{
if ( !is_array( $configuration ) )
{
- throw new InvalidArgumentException;
+ throw new ezcBaseValueException(
+ 'configuration', $configuration, 'array'
+ );
}
parent::__construct( $configuration );
Modified: trunk/Workflow/src/nodes/variables/unset.php
===================================================================
--- trunk/Workflow/src/nodes/variables/unset.php 2007-05-05 20:02:55 UTC
(rev 5069)
+++ trunk/Workflow/src/nodes/variables/unset.php 2007-05-06 08:20:11 UTC
(rev 5070)
@@ -20,7 +20,7 @@
* Constructor.
*
* @param mixed $configuration
- * @throws InvalidArgumentException
+ * @throws ezcBaseValueException
*/
public function __construct( $configuration = '' )
{
@@ -31,7 +31,9 @@
if ( !is_array( $configuration ) )
{
- throw new InvalidArgumentException;
+ throw new ezcBaseValueException(
+ 'configuration', $configuration, 'array'
+ );
}
parent::__construct( $configuration );
Modified: trunk/Workflow/src/workflow.php
===================================================================
--- trunk/Workflow/src/workflow.php 2007-05-05 20:02:55 UTC (rev 5069)
+++ trunk/Workflow/src/workflow.php 2007-05-06 08:20:11 UTC (rev 5070)
@@ -285,7 +285,7 @@
/**
* @param string $name
- * @throws InvalidArgumentException
+ * @throws ezcBaseValueException
*/
public function setName( $name )
{
@@ -295,7 +295,9 @@
}
else
{
- throw new InvalidArgumentException;
+ throw new ezcBaseValueException(
+ 'name', $name, 'string'
+ );
}
}
Modified: trunk/Workflow/tests/node_test.php
===================================================================
--- trunk/Workflow/tests/node_test.php 2007-05-05 20:02:55 UTC (rev 5069)
+++ trunk/Workflow/tests/node_test.php 2007-05-06 08:20:11 UTC (rev 5070)
@@ -38,7 +38,7 @@
{
$input = new ezcWorkflowNodeInput( null );
}
- catch ( InvalidArgumentException $e )
+ catch ( ezcBaseValueException $e )
{
return;
}
@@ -52,7 +52,7 @@
{
$input = new ezcWorkflowNodeInput( array( 'foo' => new StdClass )
);
}
- catch ( InvalidArgumentException $e )
+ catch ( ezcBaseValueException $e )
{
return;
}
@@ -66,7 +66,7 @@
{
$input = new ezcWorkflowNodeInput( array( new StdClass ) );
}
- catch ( InvalidArgumentException $e )
+ catch ( ezcBaseValueException $e )
{
return;
}
@@ -80,7 +80,7 @@
{
$set = new ezcWorkflowNodeVariableSet( null );
}
- catch ( InvalidArgumentException $e )
+ catch ( ezcBaseValueException $e )
{
return;
}
@@ -94,7 +94,7 @@
{
$set = new ezcWorkflowNodeVariableUnset( null );
}
- catch ( InvalidArgumentException $e )
+ catch ( ezcBaseValueException $e )
{
return;
}
Modified: trunk/Workflow/tests/workflow_test.php
===================================================================
--- trunk/Workflow/tests/workflow_test.php 2007-05-05 20:02:55 UTC (rev
5069)
+++ trunk/Workflow/tests/workflow_test.php 2007-05-06 08:20:11 UTC (rev
5070)
@@ -61,7 +61,7 @@
{
$workflow->setName( array() );
}
- catch ( InvalidArgumentException $e )
+ catch ( ezcBaseValueException $e )
{
return;
}
--
svn-components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/svn-components