ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Net-XMPP2/lib/Net/XMPP2/Error.pm
Revision: 1.8
Committed: Thu Jul 5 17:33:59 2007 UTC (19 years, 2 months ago) by elmex
Branch: MAIN
Changes since 1.7: +6 -459 lines
Log Message:
fixed some broken links in the documentation and moved errors
to seperate files.

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     use Net::XMPP2::Error::Presence;
10     use Net::XMPP2::Error::Message;
11 elmex 1.1
12     =head1 NAME
13    
14     Net::XMPP2::Error - An 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 elmex 1.7 =over 4
48    
49     =item B<string ()>
50 elmex 1.1
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 elmex 1.7 =back
61    
62 elmex 1.1 =head1 AUTHOR
63    
64 elmex 1.7 Robin Redeker, C<< <elmex at ta-sa.org> >>, JID: C<< <elmex at jabber.org> >>
65 elmex 1.1
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