Status: New Owner: ---- Labels: Version Type-Bug Priority-Medium OpSys-Any Dist-Any Arch-Any Desktop-Any GUI-Any
New issue 200 by svit...@gmail.com: [gb.dbus] A bug in the handling of errors when calling the dbus http://code.google.com/p/gambas/issues/detail?id=200 1) Describe the problem. When call has no return value, no error is raised. Even if the call was wrong. When calling a function, there is no detailed error message. There is only "Unable to call method". 2) GIVE THE FOLLOWING INFORMATIONS (if they are appropriate): Version: 3.0.0 Revision: none Operating system: Linux Distribution: other Architecture: x86 GUI component: none Desktop used: none 3) Provide a little project that reproduces the bug or the crash. attached project and patch CODE: Public Sub Main() Dim o As Object Print "BUG 1" Print "Try DBus[\"system://org.freedesktop.UDisks\"][\"/org/freedesktop/UDisks\"].Uninhibit(\"fake_cookie\")" Try DBus["system://org.freedesktop.UDisks"]["/org/freedesktop/UDisks"].Uninhibit("fake_cookie") If Error Then Print "NO BUG. Error message:";; Error.Text Else Print "BUG! No error message" End If Print "BUG 2" Print "Try DBus[\"system://org.freedesktop.UDisks\"][\"/org/freedesktop/UDisks\"].FindDeviceByDeviceFile(\"/fake_device\")" Try o = DBus["system://org.freedesktop.UDisks"]["/org/freedesktop/UDisks"].FindDeviceByDeviceFile("/fake_device") If Error Then If Error.Text = "Unable to call method" Then Print "BUG! No detailed error message: ";; Error.Text Else Print "NO BUG. Error message is detailed:";; Error.Text End If Else Print "No error. Strange" End If End Output: BUG 1 Try DBus["system://org.freedesktop.UDisks"]["/org/freedesktop/UDisks"].Uninhibit("fake_cookie") BUG! No error message BUG 2 Try DBus["system://org.freedesktop.UDisks"]["/org/freedesktop/UDisks"].FindDeviceByDeviceFile("/fake_device") BUG! No detailed error message: Unable to call method gbx3: warning: 6 allocation(s) non freed. After patch: BUG 1 Try DBus["system://org.freedesktop.UDisks"]["/org/freedesktop/UDisks"].Uninhibit("fake_cookie") NO BUG. Error message: org.freedesktop.UDisks.Error.Failed: No such inhibitor BUG 2 Try DBus["system://org.freedesktop.UDisks"]["/org/freedesktop/UDisks"].FindDeviceByDeviceFile("/fake_device") NO BUG. Error message is detailed: org.freedesktop.UDisks.Error.Failed: No such device gbx3: warning: 4 allocation(s) non freed. Allocation warning is probably another bug. Attachments: bug-gb.dbus-error-handle-0.0.1.tar.gz 4.7 KB gb-dbus-handle-error-bug.patch 1.3 KB ------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user