Dean Hamstead > BZ-Client > BZ::Client::Exception

Download:
BZ-Client-1.072.tar.gz

Dependencies

Annotate this POD

Website

CPAN RT

New  1
Open  1
View/Report Bugs
Module Version: 1.072   Source   Latest Release: BZ-Client-2.0_12

NAME ^

BZ::Client::Exception - Exception class thrown by BZ::Client in case of errors.

VERSION ^

version 1.072

SYNOPSIS ^

BZ::Client does not return error codes or do similar stuff. Instead, it throws instances of BZ::Client::Exception.

  my $exception = BZ::Client::Exception->new( message     => $message,
                                              http_code   => $httpCode,
                                              xmlrpc_code => $xmlrpcCode );

  BZ::Client::Exception->throw( message     => $message,
                                http_code   => $httpCode,
                                xmlrpc_code => $xmlrpcCode );

METHODS ^

new

Creates the exception object

throw

Creates the exception object then dies, so make sure you catch it!

message

Returns the error message text

xmlrpc_code

Returns the error code from XMLRPC

http_code

Returns the http code (200, 404, etc)

EXAMPLE ^

 my $client = BZ::Client->new( url => $url, user => $user, password => $pass);
 $client->login();

 # FIXME need to finish example

SEE ALSO ^

  L<BZ::Client>

AUTHORS ^

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2015 by Dean Hamstad.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

syntax highlighting: