File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,6 +34,20 @@ If ``dbus_error_name`` is not unique the :py:exc:`ValueError` will be raised.
3434Defining an exception will automatically bind incoming error message to this
3535new exception.
3636
37+ Existing exceptions can be manually binded using :py:func: `map_exception_to_dbus_error `
38+ function.
39+
40+ Functions
41+ +++++++++
42+
43+ .. py :function :: map_exception_to_dbus_error(exception, dbus_error_name)
44+
45+ Map exception to a D-bus error. Error name must be unique.
46+
47+ :param Type[Exception] exception: Exception to bind.
48+ :param str dbus_error_name: D-Bus error name to bind to.
49+
50+
3751Other exceptions
3852+++++++++++++++++++++++++
3953
Original file line number Diff line number Diff line change 9292 SdBusUnmappedMessageError ,
9393 decode_object_path ,
9494 encode_object_path ,
95+ map_exception_to_dbus_error ,
9596 sd_bus_open ,
9697 sd_bus_open_system ,
9798 sd_bus_open_system_machine ,
158159 'SdBusUnmappedMessageError' ,
159160 'decode_object_path' ,
160161 'encode_object_path' ,
162+ 'map_exception_to_dbus_error' ,
161163 'sd_bus_open' ,
162164 'sd_bus_open_system' ,
163165 'sd_bus_open_system_machine' ,
You can’t perform that action at this time.
0 commit comments