XMPP/Error/Exception.pm

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