Author: jablko
Date: Sat Nov 21 14:20:26 2009
New Revision: 3938
Log:
Take advantage of exception handling
Modified:
trunk/lib/task/migrate/MigrateTask.class.php
Modified: trunk/lib/task/migrate/MigrateTask.class.php
==============================================================================
--- trunk/lib/task/migrate/MigrateTask.class.php Sat Nov 21 11:18:17
2009 (r3937)
+++ trunk/lib/task/migrate/MigrateTask.class.php Sat Nov 21 14:20:26
2009 (r3938)
@@ -68,8 +68,7 @@
{
if (!is_readable($arguments['datafile']))
{
- $this->log('The file '.$arguments['datafile'].' is not readable.');
- die();
+ throw new Exception('The file '.$arguments['datafile'].' is not
readable.');
}
// Get target application version for data migration
@@ -77,8 +76,7 @@
{
if (!in_array($options['target-version'], $this->validVersions))
{
- $this->log('Invalid target version "'.$options['target-version'].'".');
- die();
+ throw new Exception('Invalid target version
"'.$options['target-version'].'".');
}
$this->targetVersion = $options['target-version'];
--
You received this message because you are subscribed to the Google Groups
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/qubit-commits?hl=.