This is an automated email from the git hooks/post-receive script.

intrigeri pushed a commit to branch experimental
in repository libnet-dbus-perl.

commit 765623c86943dc3908221e6ecc711d0d7b39d203
Author: Daniel P. Berrange <berra...@redhat.com>
Date:   Sat Nov 4 16:00:36 2006 -0500

    If the message reply is an error, throw a Net::Bus::Error instead of trying 
to extract return vals
---
 lib/Net/DBus/ASyncReply.pm | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lib/Net/DBus/ASyncReply.pm b/lib/Net/DBus/ASyncReply.pm
index 94f6f60..92782b2 100644
--- a/lib/Net/DBus/ASyncReply.pm
+++ b/lib/Net/DBus/ASyncReply.pm
@@ -154,6 +154,13 @@ sub get_result {
 
     my $reply = $self->{pending_call}->get_reply;
 
+    if ($reply->isa("Net::DBus::Binding::Message::Error")) {
+       my $iter = $reply->iterator();
+       my $desc = $iter->get_string();
+       die Net::DBus::Error->new(name => $reply->get_error_name,
+                                 message => $desc);
+    }
+
     my @reply;
     if ($self->{introspector}) {
        @reply = $self->{introspector}->decode($reply, "methods", 
$self->{method_name}, "returns");

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-perl/packages/libnet-dbus-perl.git

_______________________________________________
Pkg-perl-cvs-commits mailing list
Pkg-perl-cvs-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits

Reply via email to