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