Author: mcantelon
Date: Thu Jan 12 16:14:27 2012
New Revision: 10662
Log:
Added method to print and log error. Fixed error handling issue creating PHP
notice output.
Modified:
trunk/lib/QubitFlatfileImport.class.php
trunk/lib/task/csvImportTask.class.php
Modified: trunk/lib/QubitFlatfileImport.class.php
==============================================================================
--- trunk/lib/QubitFlatfileImport.class.php Thu Jan 12 15:00:32 2012
(r10661)
+++ trunk/lib/QubitFlatfileImport.class.php Thu Jan 12 16:14:27 2012
(r10662)
@@ -435,6 +435,12 @@
if ($this->errorLog) file_put_contents($this->errorLog, $message,
FILE_APPEND);
}
+ public function printAndLogError($message)
+ {
+ print $message ."\n";
+ $this->logError($message);
+ }
+
public function progressDescription()
{
// return empty string if no intermittant progress display
Modified: trunk/lib/task/csvImportTask.class.php
==============================================================================
--- trunk/lib/task/csvImportTask.class.php Thu Jan 12 15:00:32 2012
(r10661)
+++ trunk/lib/task/csvImportTask.class.php Thu Jan 12 16:14:27 2012
(r10662)
@@ -263,11 +263,17 @@
{
$parentId = $mapEntry->target_id;
} else {
- $self->logError('Could not find parent '.
$self->rowStatusVars['PARENT_ID'] .' in key_map table');
+ $error = 'Could not find parent '
+ . $self->rowStatusVars['PARENT_ID']
+ .' in key_map table';
+ $self->printAndLogError($error);
}
}
- $self->object->parentId = $parentId;
+ if (isset($parentId))
+ {
+ $self->object->parentId = $parentId;
+ }
},
/* import logic to execute after saving information object */
--
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=en.