I need to import XPO files and compile the imported xpo files at runtime(the number of xpo files that need to be imported is more than one).
But while importing we need to compile one by one . If any error is there in one xpo then next xpo should not be imported and some info message need to show.
I am using the below code for catching the compilation error, but it is not able to catch the compilation errors.
try
{
ImportPatch.import();
OldProjNode = listOldProj.AOTfindChild(OldProjName);
try
{
OldProjNode.AOTcompile();
info("Project "+ImportProjfilename+" is Successfully compiled");
}
catch
{
info("Compilation issues in "+ImportProjfilename+" Project");
return;
}
info (PathNames[OldPatchCounter]+" successfully imported");
}
catch
{
info (PathNames[OldPatchCounter]+" is NOT Successfully Imported");
return;
}
If I import any xpo where there is compilation error then it should enter into the highlighted catch area.