ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Net-XMPP2/lib/Net/XMPP2/Error.pm
Revision: 1.11
Committed: Sat Jul 7 12:39:45 2007 UTC (19 years, 2 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

# User Rev Content
1 elmex 1.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 elmex 1.8 use Net::XMPP2::Error::SASL;
6     use Net::XMPP2::Error::IQ;
7     use Net::XMPP2::Error::Register;
8     use Net::XMPP2::Error::Stanza;
9 elmex 1.10 use Net::XMPP2::Error::Stream;
10 elmex 1.8 use Net::XMPP2::Error::Presence;
11     use Net::XMPP2::Error::Message;
12 elmex 1.11 use Net::XMPP2::Error::Parser;
13 elmex 1.1
14     =head1 NAME
15    
16 elmex 1.9 Net::XMPP2::Error - Error class hierarchy for error reporting
17 elmex 1.1
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 elmex 1.7 =over 4
50    
51     =item B<string ()>
52 elmex 1.1
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 elmex 1.7 =back
63    
64 elmex 1.1 =head1 AUTHOR
65    
66 elmex 1.7 Robin Redeker, C<< <elmex at ta-sa.org> >>, JID: C<< <elmex at jabber.org> >>
67 elmex 1.1
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