diff options
author | Allen Winter <allen.winter@kdab.com> | 2015-06-01 18:06:35 -0400 |
---|---|---|
committer | Allen Winter <allen.winter@kdab.com> | 2015-06-01 18:06:35 -0400 |
commit | 1d1a5b3d2bc83ff0c36e5035df036501619317ee (patch) | |
tree | 07cd7ac23dbd5fa9939f87713e3386f4616f70fa /src/libical/icalvalue.c | |
parent | 50ee7bdd1364f617e2c04cc2af80c5c8e2b41a57 (diff) | |
download | libical-git-1d1a5b3d2bc83ff0c36e5035df036501619317ee.tar.gz |
icalvalue.c - icalvalue_new_from_string_with_error() improve warning
message if the value_kind is unknown for the specified string.
ISSUE: 178
Diffstat (limited to 'src/libical/icalvalue.c')
-rw-r--r-- | src/libical/icalvalue.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libical/icalvalue.c b/src/libical/icalvalue.c index 547ff055..955a75e3 100644 --- a/src/libical/icalvalue.c +++ b/src/libical/icalvalue.c @@ -720,8 +720,8 @@ static icalvalue *icalvalue_new_from_string_with_error(icalvalue_kind kind, default: { + char temp[TMP_BUF_SIZE]; if (error != 0) { - char temp[TMP_BUF_SIZE]; snprintf(temp, TMP_BUF_SIZE, "Unknown type for \'%s\'", str); @@ -731,7 +731,10 @@ static icalvalue *icalvalue_new_from_string_with_error(icalvalue_kind kind, 0); } - icalerror_warn("icalvalue_new_from_string got an unknown value type"); + snprintf(temp, TMP_BUF_SIZE, + "icalvalue_new_from_string got an unknown value type (%s) for \'%s\'", + icalvalue_kind_to_string(kind), str); + icalerror_warn(temp); value = 0; } } |