Important Update:
- Channels (FunctionCore & SelectableBare): - Added state "Standby", allow auto-managed handle to be opened - SelectableCore: - Set default "Persistent" state for sockets based on type - Remove Process() method (no different from SelectableBare - DateTimeCore: - Added BuildDateTimeStr() methods to build date for values - JSONparseCore: - Added error message to file operations
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
// Standard C/C++ Libraries
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
|
||||
// redA Libraries
|
||||
#include "JSONparseCore.h"
|
||||
@@ -145,7 +146,7 @@ bool CJSONparse::WriteToFile( const char * BasePath, const char * FilePath, cons
|
||||
// Open file
|
||||
if ((Handle = open( FilePath, O_CREAT|O_WRONLY|O_TRUNC, 0660 )) < 0) {
|
||||
Error = true;
|
||||
sprintf( ErrorText, "Could not open file" );
|
||||
sprintf( ErrorText, "Could not open file - [%d] %s", errno, strerror(errno) );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -243,7 +244,7 @@ bool CJSONparse::ReadFromFile( const char * BasePath, const char * FilePath )
|
||||
// Open file
|
||||
if ((Handle = open( FilePath, O_RDONLY )) < 0) {
|
||||
Error = true;
|
||||
sprintf( ErrorText, "Could not open file" );
|
||||
sprintf( ErrorText, "Could not open file - [%d] %s", errno, strerror(errno) );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user