--- a/javacommons/utils/src/logger.cpp Wed Sep 01 12:33:18 2010 +0100
+++ b/javacommons/utils/src/logger.cpp Tue Sep 14 21:06:50 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