sending self defined errors over dbus
Steve Kreyer
steve.kreyer at web.de
Fri Aug 3 05:14:18 PDT 2007
Hi,
I'm using the glib-binding for DBus and have some problems sending self
defined errors. There's an enum which is called AuxinError. The error is
set the following way:
-------------------
gboolean
some_remote_proc (..., const gchar *IN_path, GError **error)
{
...
if (error_occured)
g_set_error (error,
g_quark_from_string ("AuxinError"),
AUXIN_WRONG_PARAMETER,
"%s is not a directory!",
IN_path);
}
--------------------
If a wrong request (with the wrong parameter) via dbus-send was send, I
get "Error org.freedesktop.DBus.GLib.UnmappedError.AuxinError.Code6
/path/file is not a directory!" as an answer from DBus.
What does the symbol "UnmappedError" stand for? Is it the right way to
send errors over DBus?
Also I noticed that theres a function provided by the glib-binding which
is called dbus_g_error_domain_register. I've tried to generate GEnums
out of my raw enum definition and then register the new error domain like:
---------------
dbus_g_error_domain_register (AUXIN_ERROR, NULL, AUXIN_TYPE_ERROR);
---------------
But without success: If a wrong request at the remote procedure occures
the program crashes with the following error:
process 12861: arguments to dbus_message_new_error() were incorrect,
assertion "_dbus_check_is_valid_error_name (error_name)" failed in file
dbus-message.c line 1207.
This is normally a bug in some application using the D-Bus library.
Is there an alternative to declare the new error domain to dbus?
Any help on this issue would be appreciated ...
TIA,
Steve
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3245 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.freedesktop.org/archives/dbus/attachments/20070803/6346d68e/attachment.bin
More information about the dbus
mailing list