Gerrit::REST::Exception - Exception class for Gerrit::REST errors
This is an auxiliary class for the Gerrit::REST distribution. It's used by Gerrit::REST methods to throw exceptions when they get some error code from Gerrit itself, during a REST call. The Gerrit::REST::Exception objects are simple hash-refs containing the following information taken from the REST HTTP response:
The HTTP numeric error code.
The HTTP response contents.
Read Gerrit::REST documentation to know how to use it.
use Gerrit::REST::Exception; # ... die Gerrit::REST::Exception->new($code, $content_type, $content);
The constructor needs three arguments: the
Content-Type, and the
content of the REST HTTP error message.
This method stringifies the object like this:
The contents are converted to text if possible.
Gustavo L. de M. Chaves <firstname.lastname@example.org>
This software is copyright (c) 2013 by CPqD <www.cpqd.com.br>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.