Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 72043

AifInfoLog null problem

$
0
0

Hi!

Could you help me with understanding what is wrong in my sourcecode ??

Problem is that it dont build a exceptionMessage... aifInfoLog is empty ... infoLogEnum=0 ;/

I dont know why it doesnt work ;/

static void Test6(Args _args)
{
    AifInfoLog                          aifInfoLog = new AifInfoLog();
    SysInfoLogEnumerator                infoLogEnum;
    SysInfologMessageStruct             infoMessageStruct;
    str                                 exceptionMessage;
    SysExceptionTable                   excep;

    try
    {
        throw Exception::Error;
    }
    catch
    {

        infoLogEnum = SysInfoLogEnumerator::newData(aifInfoLog.getInfoLogData());
        while(infoLogEnum.moveNext())
        {
            infoMessageStruct = SysInfologMessageStruct::construct(infoLogEnum.currentMessage());
            exceptionMessage +="\n" + infoMessageStruct.message();
        }
        excep.Exception = Exception::Error;
        excep.Description = exceptionMessage;
        excep.Module = "Test class";
        excep.insert();
    }
}



Viewing all articles
Browse latest Browse all 72043

Trending Articles



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