ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/Net-XMPP2/lib/Net/XMPP2/Error.pm
Revision: 1.9
Committed: Thu Jul 5 19:27:35 2007 UTC (19 years, 3 months ago) by elmex
Branch: MAIN
Changes since 1.8: +1 -1 lines
Log Message:
fixed some typos and such

File Contents

# Content
1 package Net::XMPP2::Error;
2 use strict;
3 use Net::XMPP2::Util qw/stringprep_jid prep_bare_jid/;
4 use Net::XMPP2::Error;
5 use Net::XMPP2::Error::SASL;
6 use Net::XMPP2::Error::IQ;
7 use Net::XMPP2::Error::Register;
8 use Net::XMPP2::Error::Stanza;
9 use Net::XMPP2::Error::Presence;
10 use Net::XMPP2::Error::Message;
11
12 =head1 NAME
13
14 Net::XMPP2::Error - Error class hierarchy for error reporting
15
16 =head1 SYNOPSIS
17
18 die $error->string;
19
20 =head1 DESCRIPTION
21
22 This module is a helper class for abstracting any kind
23 of error that occurs in Net::XMPP2.
24
25 You receive instances of these objects by various events.
26
27 =cut
28
29 sub new {
30 my $this = shift;
31 my $class = ref($this) || $this;
32 my $self = bless { @_ }, $class;
33 $self->init;
34 $self
35 }
36
37 sub init { }
38
39 =head1 SUPER CLASS
40
41 Net::XMPP2::Error - The super class of all errors
42
43 =head2 METHODS
44
45 These methods are implemented by all subclasses.
46
47 =over 4
48
49 =item B<string ()>
50
51 Returns a humand readable string for this error.
52
53 =cut
54
55 sub string {
56 my ($self) = @_;
57 $self->{text}
58 }
59
60 =back
61
62 =head1 AUTHOR
63
64 Robin Redeker, C<< <elmex at ta-sa.org> >>, JID: C<< <elmex at jabber.org> >>
65
66 =head1 COPYRIGHT & LICENSE
67
68 Copyright 2007 Robin Redeker, all rights reserved.
69
70 This program is free software; you can redistribute it and/or modify it
71 under the same terms as Perl itself.
72
73 =cut
74
75 1; # End of Net::XMPP2