Skip Menu |
 

This queue is for tickets about the BZ-Client CPAN distribution.

Report information
The Basics
Id: 91405
Status: resolved
Priority: 0/
Queue: BZ-Client

People
Owner: Nobody in particular
Requestors: samip.banker [...] ti.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



From samip.banker [...] ti.com Fri Dec 13 15: 25:51 2013
MIME-Version: 1.0
X-Spam-Status: No, score=-6.9 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-0.001] autolearn=ham
X-Spam-Flag: NO
X-Virus-Checked: Checked
Content-Language: en-US
Importance: high
Content-Type: multipart/alternative; boundary="_000_D0B2BD49B5D7BF4099AEEAB77165B8AAE74E95DLEE12entticom_"
Message-ID: <D0B2BD49B5D7BF4099AEEAB77165B8AAE74E95 [...] DLEE12.ent.ti.com>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-MS-Tnef-Correlator:
X-Spam-Score: -6.9
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 42345240329 for <cpan-bug+BZ-Client [...] hipster.bestpractical.com>; Fri, 13 Dec 2013 15:25:51 -0500 (EST)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eaoDsuzFMmpw for <cpan-bug+BZ-Client [...] hipster.bestpractical.com>; Fri, 13 Dec 2013 15:25:49 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id DB7202400D9 for <bug-BZ-Client [...] rt.cpan.org>; Fri, 13 Dec 2013 15:25:48 -0500 (EST)
Received: (qmail 3843 invoked by alias); 13 Dec 2013 20:25:47 -0000
Received: from arroyo.ext.ti.com (HELO arroyo.ext.ti.com) (192.94.94.40) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Fri, 13 Dec 2013 12:25:44 -0800
Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id rBDKPeia001705 for <bug-BZ-Client [...] rt.cpan.org>; Fri, 13 Dec 2013 14:25:40 -0600
Received: from DLEE70.ent.ti.com (dlemailx.itg.ti.com [157.170.170.113]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id rBDKPdDh029642 for <bug-BZ-Client [...] rt.cpan.org>; Fri, 13 Dec 2013 14:25:40 -0600
Received: from DLEE12.ent.ti.com ([fe80::b01c:958e:1aa:d17f]) by DLEE70.ent.ti.com ([fe80::c4c6:f618:54e7:ad11%28]) with mapi id 14.02.0342.003; Fri, 13 Dec 2013 14:25:39 -0600
Delivered-To: cpan-bug+BZ-Client [...] hipster.bestpractical.com
Subject: Getting "BZ::Client::Exception=HASH(0x5343560)"
Return-Path: <samip.banker [...] ti.com>
X-Priority: 1
Thread-Index: Ac74QXyynXbw4/T6TYS5dO27VTE/bA==
X-RT-Mail-Extension: bz-client
X-Original-To: cpan-bug+BZ-Client [...] hipster.bestpractical.com
X-Spam-Check-BY: la.mx.develooper.com
Date: Fri, 13 Dec 2013 20:25:39 +0000
X-Spam-Level:
X-MS-Has-Attach:
Thread-Topic: Getting "BZ::Client::Exception=HASH(0x5343560)"
X-Originating-Ip: [128.247.5.50]
Accept-Language: en-US
To: "bug-BZ-Client [...] rt.cpan.org" <bug-BZ-Client [...] rt.cpan.org>
From: "Banker, Samip" <samip.banker [...] ti.com>
X-RT-Interface: Email
Content-Length: 0
content-type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-RT-Original-Encoding: iso-8859-1
Content-Length: 1420
Download (untitled) / with headers
text/plain 1.3k
Hello: I am getting this error "BZ::Client::Exception=HASH(0x5343560)" and not sure what is the actual error so I can try to fix it. My env is ð OS = Windows 7 ð Perl = 5.16.3 ð BZ::Client = 1.04 ð BZ : 4.2.4 I get the exception when "$client->login();" code is executed... Please help. Below is sample of the code... ****************************** #!/usr/bin/perl -w use strict; use BZ::Client; use BZ::Client::Bug; use BZ::Client::Product; use BZ::Client::Bugzilla; use BZ::Client::Exception; use BZ::Client::API(); my $url = "http://localhost:90/"; my $user = "user"; my $password = "password"; my $err = ""; my $client = BZ::Client->new("url" => $url, "user" => $user, "password" => $password); $client->logDirectory("C:/bzSynclog"); print $client->is_logged_in(); $client->login(); my $exception = BZ::Client::Bug->get($client, '8'); ****************************** Best Regards, *************************************************** _ Samip K. Banker _| TI Software Development Organization, \. _} Solution Architect (Quality Assurance / CM) \( Texas Instruments, Inc. Support : pfo-tg@list.ti.com<mailto:pfo-tg@list.ti.com> (for OMAP Infrastructure) Work: (214)567 - 7646 Cell: (469)360 - 2064 Linked-in: http://lnkd.in/yKchj4 ***************************************************
content-type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-RT-Original-Encoding: iso-8859-1
Content-Length: 9534
MIME-Version: 1.0
In-Reply-To: <D0B2BD49B5D7BF4099AEEAB77165B8AAE74E95 [...] DLEE12.ent.ti.com>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <D0B2BD49B5D7BF4099AEEAB77165B8AAE74E95 [...] DLEE12.ent.ti.com>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-20366-1443064281-1484.91405-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 2449
Download (untitled) / with headers
text/plain 2.3k
You should do something like this: use Try::Tiny; .. (etc) .. try { my $bug = BZ::Client::Bug->get($client, '8'); } catch { my $reason = 'Failed. Message: ' . $_->message(); $reason .= ' XML code: ' . $_->xmlrpc_code() if $_->xmlrpc_code; $reason .= ' HTTP code: ' . $_->http_code() if $_->http_code; die $reason } Alternatively you can use perls in-built eval{} rather than Try::Tiny. Whatever suits your tastes. Also if you are lazy, as all good perl programmers are. You can just use Data::Dumper to dump the exception object rather than fussing about with the object methods. This has good whipupitude qualities although is a little rough as a final error output message for a novice end user. e.g. use Data::Dumper; eval { my $bug = BZ::Client::Bug->get($client, '8'); }; if ($@) { die 'Error: ' . Dumper( $@ ) } On Fri Dec 13 15:25:52 2013, samip.banker@ti.com wrote: Show quoted text
> Hello: > > I am getting this error "BZ::Client::Exception=HASH(0x5343560)" and > not sure what is the actual error so I can try to fix it. > My env is > > ð OS = Windows 7 > > ð Perl = 5.16.3 > > ð BZ::Client = 1.04 > > ð BZ : 4.2.4 > > I get the exception when "$client->login();" code is executed... > Please help. > > Below is sample of the code... > ****************************** > #!/usr/bin/perl -w > use strict; > use BZ::Client; > use BZ::Client::Bug; > use BZ::Client::Product; > use BZ::Client::Bugzilla; > use BZ::Client::Exception; > use BZ::Client::API(); > > my $url = "http://localhost:90/"; > my $user = "user"; > my $password = "password"; > my $err = ""; > > > my $client = BZ::Client->new("url" => $url, > "user" => $user, > "password" => $password); > > $client->logDirectory("C:/bzSynclog"); > > print $client->is_logged_in(); > $client->login(); > > my $exception = BZ::Client::Bug->get($client, '8'); > > ****************************** > > > > > > > > > Best Regards, > *************************************************** > _ Samip K. Banker > _| TI Software Development Organization, > \. _} Solution Architect (Quality Assurance / CM) > \( Texas Instruments, Inc. > Support : pfo-tg@list.ti.com<mailto:pfo-tg@list.ti.com> (for OMAP > Infrastructure) > Work: (214)567 - 7646 > Cell: (469)360 - 2064 > Linked-in: http://lnkd.in/yKchj4 > ***************************************************
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-20366-1443064281-1484.91405-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <D0B2BD49B5D7BF4099AEEAB77165B8AAE74E95 [...] DLEE12.ent.ti.com> <rt-4.0.18-20366-1443064281-1484.91405-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-5449-1443064317-393.91405-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 2747
Download (untitled) / with headers
text/plain 2.6k
At some point in the near future i will add this to the pod On Wed Sep 23 23:11:21 2015, djzort wrote: Show quoted text
> You should do something like this: > > use Try::Tiny; > .. (etc) .. > > try { > my $bug = BZ::Client::Bug->get($client, '8'); > } > catch { > my $reason = 'Failed. Message: ' . $_->message(); > $reason .= ' XML code: ' . $_->xmlrpc_code() if $_->xmlrpc_code; > $reason .= ' HTTP code: ' . $_->http_code() if $_->http_code; > die $reason > } > > > Alternatively you can use perls in-built eval{} rather than Try::Tiny. > Whatever suits your tastes. > > Also if you are lazy, as all good perl programmers are. You can just > use Data::Dumper to dump the exception object rather than fussing > about with the object methods. This has good whipupitude qualities > although is a little rough as a final error output message for a > novice end user. > > e.g. > > use Data::Dumper; > > eval { > my $bug = BZ::Client::Bug->get($client, '8'); > }; > if ($@) { > die 'Error: ' . Dumper( $@ ) > } > > > > > On Fri Dec 13 15:25:52 2013, samip.banker@ti.com wrote:
> > Hello: > > > > I am getting this error "BZ::Client::Exception=HASH(0x5343560)" and > > not sure what is the actual error so I can try to fix it. > > My env is > > > > ð OS = Windows 7 > > > > ð Perl = 5.16.3 > > > > ð BZ::Client = 1.04 > > > > ð BZ : 4.2.4 > > > > I get the exception when "$client->login();" code is executed... > > Please help. > > > > Below is sample of the code... > > ****************************** > > #!/usr/bin/perl -w > > use strict; > > use BZ::Client; > > use BZ::Client::Bug; > > use BZ::Client::Product; > > use BZ::Client::Bugzilla; > > use BZ::Client::Exception; > > use BZ::Client::API(); > > > > my $url = "http://localhost:90/"; > > my $user = "user"; > > my $password = "password"; > > my $err = ""; > > > > > > my $client = BZ::Client->new("url" => $url, > > "user" => $user, > > "password" => $password); > > > > $client->logDirectory("C:/bzSynclog"); > > > > print $client->is_logged_in(); > > $client->login(); > > > > my $exception = BZ::Client::Bug->get($client, '8'); > > > > ****************************** > > > > > > > > > > > > > > > > > > Best Regards, > > *************************************************** > > _ Samip K. Banker > > _| TI Software Development Organization, > > \. _} Solution Architect (Quality Assurance / CM) > > \( Texas Instruments, Inc. > > Support : pfo-tg@list.ti.com<mailto:pfo-tg@list.ti.com> (for > > OMAP > > Infrastructure) > > Work: (214)567 - 7646 > > Cell: (469)360 - 2064 > > Linked-in: http://lnkd.in/yKchj4 > > ***************************************************
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-5449-1443064317-393.91405-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <D0B2BD49B5D7BF4099AEEAB77165B8AAE74E95 [...] DLEE12.ent.ti.com> <rt-4.0.18-20366-1443064281-1484.91405-0-0 [...] rt.cpan.org> <rt-4.0.18-5449-1443064317-393.91405-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-19806-1483055688-760.91405-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 71
This is now covered in the pod for BZ::Client::Exception in release 4.4


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.