Tuesday, December 27, 2011

SysInfolog Enumurator


infologData infologData;
SysInfologEnumerator sysInfologEnumerator;
;
Warning("This is to test warning");
Error("This is to test Error");
infologData = infolog.infologData();
sysInfologEnumerator = SysInfologEnumerator::newData(infoLogData);

// loop the enumerator and jump from loop when an error has been found
while (sysInfologEnumerator.moveNext())
{
if(sysInfologEnumerator.currentException() == Exception::Error)
{
messageText = strrtrim(strltrim(sysInfologEnumerator.currentMessage()));
messageText = substr(messageText,3,strlen(messageText));
}if(sysInfologEnumerator.currentException() == Exception::Warning)
{
messageText = strrtrim(strltrim(sysInfologEnumerator.currentMessage()));
messageText = substr(messageText,3,strlen(messageText));
}

}