--- a/javacommons/utils/src/logger.cpp Thu Aug 19 09:48:13 2010 +0300
+++ b/javacommons/utils/src/logger.cpp Tue Aug 31 15:09:22 2010 +0300
@@ -340,14 +340,16 @@
int logFileNameLen = strlen(fileName);
TPtr8 fileNamePtr((unsigned char*)fileName, logFileNameLen, logFileNameLen);
RBuf nameBuf;
- nameBuf.Create(fileNamePtr.MaxLength());
- nameBuf.Copy(fileNamePtr);
+ int rc = nameBuf.Create(fileNamePtr.MaxLength());
+ if (rc == KErrNone)
+ {
+ nameBuf.Copy(fileNamePtr);
- TInt len = strlen(txt);
- TPtr8 ptr((unsigned char*)txt, len, len);
- RFileLogger::Write(KJavaLogDir, nameBuf, EFileLoggingModeAppendRaw, ptr);
-
- nameBuf.Close();
+ TInt len = strlen(txt);
+ TPtr8 ptr((unsigned char*)txt, len, len);
+ RFileLogger::Write(KJavaLogDir, nameBuf, EFileLoggingModeAppendRaw, ptr);
+ nameBuf.Close();
+ }
#else //J_LOG_USE_RLOGGER_ENABLED