AnyEvent-XMPP

 view release on metacpan or  search on metacpan

lib/AnyEvent/XMPP/Error/Exception.pm  view on Meta::CPAN

package AnyEvent::XMPP::Error::Exception;
use AnyEvent::XMPP::Error;
use strict;
our @ISA = qw/AnyEvent::XMPP::Error/;

=head1 NAME

AnyEvent::XMPP::Error::Exception - Some exception was thrown somewhere

Subclass of L<AnyEvent::XMPP::Error>

=head2 METHODS

=over 4

=item B<exception>

This returns the exception object that was thrown in C<$@>.

=cut

sub exception { $_[0]->{exception} }

=item B<context>

This returns a string which describes the context in which this exception
was thrown

=cut

sub context   { $_[0]->{context} }

sub string {
   my ($self) = @_;

   sprintf "exception in context '%s': %s",
      $self->context, $self->exception



( run in 0.255 second using v1.01-cache-2.11-cpan-496ff517765 )