#include <dali/internal/adaptor-framework/common/file-loader-impl.h>
// EXTERNAL INCLUDES
-#include <string>
+#include <cstring>
#include <fstream>
#include <dali/integration-api/debug.h>
}
else
{
- DALI_LOG_ERROR( "file open failed for: \"%s\"\n", filename.c_str() );
+ char buf[512];
+ DALI_LOG_ERROR( "file open failed for: \"%s\", error : %s\n", filename.c_str(), strerror_r( errno, buf, 512 ) );
}
return errorCode;
#include <dali/internal/adaptor-framework/common/file-stream-impl.h>
// EXTERNAL INCLUDES
-#include <string>
+#include <cstring>
#include <fstream>
#include <dali/integration-api/debug.h>
mFile = fopen( mFileName.c_str(), openMode );
if( !mFile )
{
+ char buf[512];
DALI_LOG_ERROR( "file open failed for: \"%s\", in mode: \"%s\".\n", mFileName.c_str(), openMode );
+ DALI_LOG_ERROR( "file open failed error : %s\n", strerror_r( errno, buf, 512 ) );
}
}
else if( mBuffer )
mFile = fmemopen( mBuffer, mDataSize, openMode );
if( !mFile )
{
+ char buf[512];
DALI_LOG_ERROR( "File open failed for memory buffer at location: \"%p\", of size: \"%u\", in mode: \"%s\".\n",
static_cast<void*>( mBuffer ), static_cast<unsigned>( mDataSize ), openMode );
+ DALI_LOG_ERROR( "file open failed error : %s\n", strerror_r( errno, buf, 512 ) );
}
}