912ddf031d
Define a DBusCxxException class in gdbus cxx bridge. It only has 2 virtual functions: getName, getMessage, which provide the information necessary to generate a D-Bus error. Then define a class DBusSyncException deriving from DBusCxxException and SyncEvo::Exception. Also 3 classes NoSuchConfig, NoSuchSource, InvalidCall are based on DBusSyncException. Turn some errors into these 3 specific errors. Define a macro to let user have an opportunity to write its own exception handling function. The SyncEvoHandleException() logs the error via Exception::handle() and then overrides the conversion of all exceptions so that they result in an "org.syncevolution.Exception", unless specified otherwise when throwing a DBusCXXException or dbus_error. |
||
---|---|---|
.. | ||
test | ||
debug.c | ||
debug.h | ||
gdbus-cxx-bridge.h | ||
gdbus-cxx.h | ||
gdbus.h | ||
mainloop.c | ||
Makefile.am | ||
object.c | ||
README | ||
watch.c |
This is a copy of the libgdbus source code: http://git.kernel.org/?p=bluetooth/libgdbus.git;a=summary It is licensed under LGPL v2.1, see upstream COPYING. The source is included here because there is no stable upstream release. Patches added here need to be submitted upstream. Likewise, patches applied upstream must be imported. The build/import-gdbus.sh script automates that process. See build/import-foreign-git.sh for details.