Better error handling when upgrading

This commit is contained in:
Nathan Gray 2013-08-12 21:12:22 +00:00
parent 766a4a513f
commit 9d8e8bbd56

View File

@ -84,11 +84,19 @@ function importexport_upgrade1_9_002()
// step through each file in defdir of app // step through each file in defdir of app
$d = dir($defdir); $d = dir($defdir);
while (false !== ($entry = $d->read())) { while (false !== ($entry = $d->read())) {
try
{
$file = $defdir. '/'. $entry; $file = $defdir. '/'. $entry;
list( $filename, $extension) = explode('.',$entry); list( $filename, $extension) = explode('.',$entry);
if ( $extension != 'xml' ) continue; if ( $extension != 'xml' ) continue;
importexport_definitions_bo::import( $file ); importexport_definitions_bo::import( $file );
} }
catch (Exception $e)
{
error_log($e->getMessage());
error_log("Unable to import definition file $file, skipping it.");
}
}
} }
} }
// give Default and Admins group rights for ImportExport // give Default and Admins group rights for ImportExport