* Catch and process all exceptions (not just sdbus::Error) from callback handlers
* Unify handling of exceptions from all types of callbacks -- always set sd_bus_error and return a negative result number in case of exception
Although libsystemd logs (with DEBUG severity) all errors from such callback handlers (except method callback handler), it seems to be out of our control. One of handy sdbus-c++ features could be the ability for clients to install a log callback, which sdbus-c++ would call in case of exceptions flying from callback handlers. In case something doesn't work for clients (especially novices), they can first look into these logs.
This may be handy in common situations like ignored signals on client side because of the inadvertent mismatch between real signal signature and signal handler signature. Like here: #373. (Although in this specific case of signals, there is a solution with an additional const sdbus::Error* argument that would reveal such an error.)
* feat: add support for direct connections
* refactor: simplify a bit, change comments, extend tests
* fix: compiler warning about unused variable
* docs: add section on direct connections to the tutorial
---------
Co-authored-by: Maksim Fedyarov <m.fedyarov@omp.ru>
Co-authored-by: Stanislav Angelovič <stanislav.angelovic@protonmail.com>
* feat: add async property get/set convenience support classes
* feat: add no-reply and async overloads to Properties_proxy
* feat: add convenience functions for GetAll functionality
* test: add tests for new functionality
* add codegen IDL support and documentation
* feat: support serialization of array, span and unordered_map
* fix some spelling mistakes
* docs: update table of valid c++ types
---------
Co-authored-by: Marcel Hellwig <github@cookiesoft.de>
* Added D-Bus type C++ type table
* docs: do corrections and rewordings in the proposed chapter
Co-authored-by: Stanislav Angelovič <stanislav.angelovic@protonmail.com>
Allow to use human readable chrono literals to specify method call
timeout. The change is backward compatbile - if no unit is provided,
the fallback is "us".
Example:
<annotation name="org.freedesktop.DBus.Method.Timeout" value="500ms"/>
* fix: minor documentation and test improvements
* doc: add link to tests in standard interfaces tutorial secion
* Update README.md
Co-authored-by: Urs Ritzmann <urs.ritzmann@kistler.com>
* Update docs/using-sdbus-c++.md
Co-authored-by: Urs Ritzmann <urs.ritzmann@kistler.com>
* Use cmake instead of make in build instructions
Co-authored-by: Stanislav Angelovic <stanislav.angelovic@siemens.com>
Co-authored-by: Urs Ritzmann <urs.ritzmann@kistler.com>