Setup: added detailed reporting on the data model validation issues

SVN:trunk[1953]
This commit is contained in:
Romain Quetiez
2012-04-11 15:21:08 +00:00
parent 6826e132a8
commit 46e3eac149

View File

@@ -188,10 +188,24 @@ try
}
}
//$oFactory->Dump();
$oMFCompiler = new MFCompiler($oFactory, $sSourcePath);
$oMFCompiler->Compile($sTargetPath);
SetupPage::log_info("Data model successfully compiled to '$sTargetPath'.");
if ($oFactory->HasLoadErrors())
{
foreach($oFactory->GetLoadErrors() as $sModuleId => $aErrors)
{
SetupPage::log_error("Data model source file (xml) could not be loaded - found errors in module: $sModuleId");
foreach($aErrors as $oXmlError)
{
SetupPage::log_error("Load error: File: ".$oXmlError->file." Line:".$oXmlError->line." Message:".$oXmlError->message);
}
}
throw new Exception("The data model could not be compiled. Please check the setup error log");
}
else
{
$oMFCompiler = new MFCompiler($oFactory, $sSourcePath);
$oMFCompiler->Compile($sTargetPath);
SetupPage::log_info("Data model successfully compiled to '$sTargetPath'.");
}
break;
//////////////////////////////