[PATCH] net-dbus: Raise exception at 'introspector' if network is lost

Pavel Strashkin pavel.strashkin at gmail.com
Mon Nov 28 15:20:28 PST 2011


I believe they are, but in theory :) The question is, as you said, how
many bindings support it. libdbus, gdbus, dbus-java, dbus-python -
they do. dbus-perl doesn't (good point to do it). We can keep it as is
and start looking for a further problems (there is more than NoReply,
..., codes) or we can implement it as it should be (rely on UnknownXXX
errors, actually only 2 of 3) and die with an exception. I'm sure on
99% it won't break anything, but in case of one we'll reach the author
and ask him improve an implementation. This is the only way (strict
rules) make open-source quality better (especially if you can
contribute and help author, nobody is trying to leave you alone with
your "troubles").

2011/11/28 Daniel P. Berrange <dan at berrange.com>:
> On Mon, Nov 28, 2011 at 01:51:27PM -0800, Pavel Strashkin wrote:
>> D-Bus is the protocol with a strict specification. Inside
>> dbus/dbus-protocol.h i've found the following errors which binding
>> probably should check for and do nothing:
>>
>> 395 /** Interface you invoked a method on isn't known by the object. */
>> 396 #define DBUS_ERROR_UNKNOWN_INTERFACE
>> "org.freedesktop.DBus.Error.UnknownInterface"
>>
>> 391 /** Method name you invoked isn't known by the object you invoked it on. */
>> 392 #define DBUS_ERROR_UNKNOWN_METHOD
>> "org.freedesktop.DBus.Error.UnknownMethod"
>>
>> What do you think?
>
> Unfortunately those error names are not part of the DBus specification[1].
> They happen to be used by some, but not all, implementations / bindings [2].
> So we can't really rely on those in this case.
>
> Regards,
> Daniel
>
> [1] http://dbus.freedesktop.org/doc/dbus-specification.html
> [2] http://www.freedesktop.org/wiki/Software/DBusBindingErrors
> --
> |: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
> |: http://libvirt.org              -o-             http://virt-manager.org :|
> |: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
> |: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|
>


More information about the dbus mailing list