| 1 |
package Net::XMPP2::Error::Exception; |
| 2 |
use Net::XMPP2::Error; |
| 3 |
our @ISA = qw/Net::XMPP2::Error/; |
| 4 |
|
| 5 |
=head1 NAME |
| 6 |
|
| 7 |
Net::XMPP2::Error::Exception - Some exception was thrown somewhere |
| 8 |
|
| 9 |
Subclass of L<Net::XMPP2::Error> |
| 10 |
|
| 11 |
=head2 METHODS |
| 12 |
|
| 13 |
=over 4 |
| 14 |
|
| 15 |
=item B<exception> |
| 16 |
|
| 17 |
This returns the exception object that was thrown in C<$@>. |
| 18 |
|
| 19 |
=cut |
| 20 |
|
| 21 |
sub exception { $_[0]->{exception} } |
| 22 |
|
| 23 |
=item B<context> |
| 24 |
|
| 25 |
This returns a string which describes the context in which this exception |
| 26 |
was thrown |
| 27 |
|
| 28 |
=cut |
| 29 |
|
| 30 |
sub context { $_[0]->{context} } |
| 31 |
|
| 32 |
sub string { |
| 33 |
my ($self) = @_; |
| 34 |
|
| 35 |
sprintf "exception in context '%s': %s", |
| 36 |
$self->context, $self->exception |
| 37 |
} |
| 38 |
|
| 39 |
=back |
| 40 |
|
| 41 |
=head1 AUTHOR |
| 42 |
|
| 43 |
Robin Redeker, C<< <elmex at ta-sa.org> >>, JID: C<< <elmex at jabber.org> >> |
| 44 |
|
| 45 |
=head1 COPYRIGHT & LICENSE |
| 46 |
|
| 47 |
Copyright 2007 Robin Redeker, all rights reserved. |
| 48 |
|
| 49 |
This program is free software; you can redistribute it and/or modify it |
| 50 |
under the same terms as Perl itself. |
| 51 |
|
| 52 |
=cut |
| 53 |
|
| 54 |
1; # End of Net::XMPP2 |