Quantcast
Channel: Martin Dráb's Activities
Viewing all articles
Browse latest Browse all 17532

Need to Catch the Compilation Error after Importing .xpo file at Runtime

$
0
0

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.


Viewing all articles
Browse latest Browse all 17532

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>