Closed GaikwadPratik closed 2 years ago
I'm also affected by this issue.
@GaikwadPratik the issue in this concrete case is that the error name is invalid - it's expected to be in interface.member
notation, so for example com.hiveio.vmmanager.TestErrorName
here. Otherwise the error reply is silently dropped at the moment, which is of course not nice. Of course some feedback would be nice, but there's really no good interface for it with the Export
mechanism. Maybe just an additional log, though I normally try to keep direct logging from library code to an absolute minimum
@guelfey ,
What is the difference between dbus.Error
or dbus.DBusError
? Which one should be preferred ?
Both are possible. Error
is basically the internal representation and simplest possible implementation of DBusError
. The latter one is a bit nicer to use if you already have some type that implements error
inside your main code; the first one is simpler otherwise if you just want to return a specific D-Bus error message.
Hi,
I'm referencing server example to create a d-bus server. The entire code is
I'm trying to test this code using linux terminal before creating a client in my main project just to make sure everything works. The invocation is done using:
If
CheckHostForMigration
does not return an error, meaning the second parameter asnil
, the above call gets executed and returns value correctly. However, if there is an error being returned, then I get following error:Can anyone please help? Another question is, what should be correct return type
dbus.Error
ordbus.DBusError
?