Yeah, that's how the camel code does it. I think there are ways to sanely marshal errors over dbus?
-- dwmw2 (Apologies for HTML and top-posting; Android mail is broken) Patrick Ohly <[email protected]> wrote: Hello! I'd like to add error handling for libeassync GError {domain = 71, code = 32, message = 0x12ce180 "Sync error: Invalid synchronization key"}. I started looking for the place where this domain and code are defined. It seems that it is currently only defined in the daemon side (eas-connection-errors.h: EAS_CONNECTION_ERROR/EAS_SYNC_STATUS_INVALIDSYNCKEY). On the client side, the GError is a generic D-Bus error: #1 0x00007ffff007903d in g_set_error (err=0x7fffffff7910, domain=71, code=32, format=0x7ffff79c35c3 "%s%c%s") at ../../../glib/glib/gerror.c:220 #2 0x00007ffff79b4b30 in dbus_set_g_error () from /usr/lib/libdbus-glib-1.so.2 #3 0x00007ffff79b7a9d in ?? () from /usr/lib/libdbus-glib-1.so.2 #4 0x00007ffff79b8683 in dbus_g_proxy_call () from /usr/lib/libdbus-glib-1.so.2 #5 0x00007ffff7bcf302 in eas_sync_handler_get_items (self=0x12b8c00, sync_key_in=0x12d4178 "1309863698", sync_key_out=0x7fffffff7900, type=EAS_ITEM_CONTACT, folder_id=0x7fffef9ca138 "", items_created=0x7fffffff78f0, items_updated=0x7fffffff78e0, items_deleted=0x7fffffff78d0, more_available=0x7fffffff790c, error=0x7fffffff7910) at /home/pohly/src/activesyncd/libeasclient/libeassync.c:258 Shouldn't there be some way of detecting errors inside the daemon based on their error code? Right now, all I can do (please correct me if I'm wrong) is a string match against a string which isn't even officially part of the libeasclient API (not defined in any header file) - that doesn't sound right to me. -- Best Regards, Patrick Ohly The content of this message is my personal opinion only and although I am an employee of Intel, the statements I make here in no way represent Intel's position on the issue, nor am I authorized to speak on behalf of Intel on this matter. _______________________________________________ SyncEvolution mailing list [email protected] http://lists.syncevolution.org/listinfo/syncevolution
