Add error message for syntax error in the configuration file, see #119

This commit is contained in:
Micke Prag 2012-04-13 10:56:36 +02:00
parent eb95ffe8a5
commit 12eb097ce4
2 changed files with 4 additions and 2 deletions

View file

@ -1001,7 +1001,7 @@ int WINAPI tdMethods(int id, int methodsSupported){
* @since Version 2.0.0 * @since Version 2.0.0
**/ **/
char * WINAPI tdGetErrorString(int intErrorNo) { char * WINAPI tdGetErrorString(int intErrorNo) {
const int numResponses = 11; const int numResponses = 12;
const char *responses[numResponses] = { const char *responses[numResponses] = {
"Success", "Success",
"TellStick not found", "TellStick not found",
@ -1013,7 +1013,8 @@ char * WINAPI tdGetErrorString(int intErrorNo) {
"Received an unknown response", "Received an unknown response",
"Syntax error", "Syntax error",
"Broken pipe", "Broken pipe",
"An error occurred while communicating with the Telldus Service" "An error occurred while communicating with the Telldus Service",
"Syntax error in the configuration file"
}; };
std::string strReturn; std::string strReturn;
intErrorNo = abs(intErrorNo); //We don't use negative values here. intErrorNo = abs(intErrorNo); //We don't use negative values here.

View file

@ -125,6 +125,7 @@ extern "C" {
#define TELLSTICK_ERROR_SYNTAX -8 #define TELLSTICK_ERROR_SYNTAX -8
#define TELLSTICK_ERROR_BROKEN_PIPE -9 #define TELLSTICK_ERROR_BROKEN_PIPE -9
#define TELLSTICK_ERROR_COMMUNICATING_SERVICE -10 #define TELLSTICK_ERROR_COMMUNICATING_SERVICE -10
#define TELLSTICK_ERROR_CONFIG_SYNTAX -11
#define TELLSTICK_ERROR_UNKNOWN -99 #define TELLSTICK_ERROR_UNKNOWN -99
//Device typedef //Device typedef