L.S.
Please, I need some help with this job. Can you see why I don't get a result for error or warnings?
static void BestPractiseJob(Args _args)
{
SysBPCheck sysBPCheck;
TreeNode node;
SysCompilerOutput sysCompilerOutput;
#AOT
;
node = treenode::findNode(#ClassesPath);
node = node.AOTfindChild("SalesFormLetter");
sysCompilerOutput = infolog.compilerOutput();
SysBPCheck::checkTreeNode(node);
// sysCompilerOutput.startCompilationContext();
// sysCompilerOutput.endCompilationContext();
info(strFmt("Message count: %1", sysCompilerOutput.bestPracticesCount()));
info(strFmt("Error count: %1", sysCompilerOutput.errorCount()));
info(strFmt("Warning count: %1", sysCompilerOutput.warningCount()));
}
*This post is locked for comments
Hi,
i noticed 2 things : your object sysCompilationOutput is not instanciated.
i think you can try to create it manually and then use it as the input parameter
of the infolog class called.
The second thing is that you use the BP check, have you tried to actually
compile the class via a call like node.AOTCompile() or something similar?
I'm not sure but maybe code access permissions will be needed in the last case.
Regards.
Thanks for your reply,
Yes I ran the job against a self made crappy class... All seems fine, though the error count and warning count remain zero. That can't be right....
Do you know what the ...context means?
Hi,
your job works, it's only not displaying errors or warnings because SalesFormLetter
class does not have errors or warnings at compilation in your environment.
Have you tried your job on a class that does not compile ?
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,228 Super User 2024 Season 2
Martin Dráb 230,056 Most Valuable Professional
nmaenpaa 101,156