ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Net-XMPP2/lib/Net/XMPP2/Error.pm
Revision: 1.12
Committed: Wed Jul 11 13:34:54 2007 UTC (19 years, 2 months ago) by elmex
Branch: MAIN
CVS Tags: HEAD
Changes since 1.11: +1 -0 lines
Log Message:
added development client example

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