Skip to content

Commit

Permalink
Invalid config format: show more detailed error message.
Browse files Browse the repository at this point in the history
  • Loading branch information
荒野無燈 authored and liudf0716 committed Jun 12, 2017
1 parent 5312eca commit 564f43a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xkcp_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ static int parse_json_int(const json_value *value)
} else if (value->type == json_boolean) {
return value->u.boolean;
} else {
debug(LOG_ERR, "%d", value->type);
debug(LOG_ERR, "Need type :%d or %d, now get wrong type: %d", json_integer, json_boolean, value->type);
debug(LOG_ERR, "Invalid config format.");
}
return 0;
Expand All @@ -113,7 +113,7 @@ static char * parse_json_string(const json_value *value)
} else if (value->type == json_null) {
return NULL;
} else {
debug(LOG_ERR, "%d", value->type);
debug(LOG_ERR, "Need type :%d or %d, now get wrong type: %d", json_string, json_null, value->type);
debug(LOG_ERR, "Invalid config format.");
}
return 0;
Expand Down

0 comments on commit 564f43a

Please sign in to comment.