From 66ca1871d518e6c13c87ae891d2eb57069d6575d Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 17 Sep 2014 19:53:02 +0100 Subject: [PATCH 3/5] tp_base_protocol_sanitize_parameters: set error if unable to coerce --- telepathy-glib/base-protocol.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/telepathy-glib/base-protocol.c b/telepathy-glib/base-protocol.c index 8faaf22..f98f758 100644 --- a/telepathy-glib/base-protocol.c +++ b/telepathy-glib/base-protocol.c @@ -1317,7 +1317,12 @@ tp_base_protocol_sanitize_parameters (TpBaseProtocol *self, G_VARIANT_TYPE (param->dtype)); if (coerced == NULL) - goto except; + { + g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT, + "unable to convert %s from type '%s' to type '%s'", + name, G_VALUE_TYPE_NAME (value), param->dtype); + goto except; + } if (param->filter != NULL) { -- 2.1.0