WebService::Shutterstock::Exception - Exception object to allow for easy error handling on HTTP errors
version 0.004
# better safe than sorry try { my $license = $customer->license($image_id) $license->save('/path/to/my/photos'); } catch { my $error = $_; # handle error... };
This class provides more context for an error message than just a simple string (although it stringifies to make it act like your typical $@ value).
$@
The HTTP::Request object for the API request that died.
The HTTP::Response object for the API request that died.
String error message. Often, the body of the HTTP response that errored out.
A HashRef of information (package, file, line) of where this exception originated (in non-WebService-Shutterstock land).
Stringifies to error message, used by overloaded stringification.
Brian Phillips <bphillips@cpan.org>
This software is copyright (c) 2012 by Brian Phillips and Shutterstock, Inc. (http://shutterstock.com).
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install WebService::Shutterstock, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::Shutterstock
CPAN shell
perl -MCPAN -e shell install WebService::Shutterstock
For more information on module installation, please visit the detailed CPAN module installation guide.