[Telepathy-commits] [telepathy-glib/master] Set InvalidHandle when handles are invalid, not InvalidArgument.
Simon McVittie
simon.mcvittie at collabora.co.uk
Thu Oct 9 06:05:08 PDT 2008
It turns out we've been raising the wrong error all this time...
---
telepathy-glib/handle-repo-dynamic.c | 2 +-
telepathy-glib/handle-repo-static.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/telepathy-glib/handle-repo-dynamic.c b/telepathy-glib/handle-repo-dynamic.c
index 12fef3e..03558f4 100644
--- a/telepathy-glib/handle-repo-dynamic.c
+++ b/telepathy-glib/handle-repo-dynamic.c
@@ -561,7 +561,7 @@ dynamic_handle_is_valid (TpHandleRepoIface *irepo, TpHandle handle,
if (handle_priv_lookup (self, handle) == NULL)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_HANDLE,
"handle %u is not currently a valid %s handle (type %u)",
handle, tp_handle_type_to_string (self->handle_type),
self->handle_type);
diff --git a/telepathy-glib/handle-repo-static.c b/telepathy-glib/handle-repo-static.c
index 68b832a..eeac967 100644
--- a/telepathy-glib/handle-repo-static.c
+++ b/telepathy-glib/handle-repo-static.c
@@ -195,7 +195,7 @@ static_handle_is_valid (TpHandleRepoIface *irepo,
if (handle <= 0 || handle > self->last_handle)
{
- g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
+ g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_HANDLE,
"handle %u is not a valid %s handle (type %u)",
handle, tp_handle_type_to_string (self->handle_type),
self->handle_type);
--
1.5.6.5
More information about the Telepathy-commits
mailing list