NAME
WebService::MyGengo::Exception - Exception class for the WebService::MyGengo library.
SYNOPSIS
eval { my $job = $client->get_job( "ARGH!" ) };
if ( blessed($@) eq 'WebService::MyGengo::Exception' ) {
printf "Exception: %s\n", $@->message;
}
DESCRIPTION
All exceptions thrown by operations in the WebService::MyGengo library will be instances of this object.
Note: Unless specified otherwise, errors from the transport layer are not caught and wrapped with this class.
ATTRIBUTES
message (Str)
The error message.
Object stringification is overloaded to return this attribute.
eval { <something that throws an Exception> };
print "Oops: '$@'\n"; # Prints the Exception message
stacktrace (Str)
A stacktrace from the point where the Exception was thrown.
The previous_exception attribute holds any previous exceptions.
See: Throwable
AUTHOR
Nathaniel Heinrichs
LICENSE
Copyright (c) 2011, Nathaniel Heinrichs <nheinric-at-cpan.org>. All rights reserved.
This library is free software. You can redistribute it and/or modify it under the same terms as Perl itself.