ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/Net-XMPP2/lib/Net/XMPP2/Error.pm
Revision: 1.10
Committed: Fri Jul 6 09:40:15 2007 UTC (19 years, 3 months ago) by elmex
Branch: MAIN
Changes since 1.9: +1 -0 lines
Log Message:
added simxml() function for simpler xml writing
and made writing of data segmented.

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