Error.pm untested

filter: Statementstmt 0.0% 0 / 19 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 6 Podpod n/a totaltotal 0.0% 0 / 25 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 #
2 # Courier::Error class
3 #
4 # (C) 2003-2008 Julian Mehnle <julian@mehnle.net>
5 # $Id: Error.pm 210 2008-03-21 19:30:31Z julian $
6 #
7 ###############################################################################
8  
9 =head1 NAME
10  
11 Courier::Error - Exception class for Perl modules related to the Courier MTA
12  
13 =cut
14  
15 package Courier::Error;
16  
17 use warnings;
18 use strict;
19  
20 use Error;
21  
22 use base 'Error::Simple';
23  
24 use constant TRUE => (0 == 0);
25 use constant FALSE => not TRUE;
26  
27 =head1 SYNOPSIS
28  
29 =head2 Exception handling
30  
31 use Error qw(:try);
32 use Courier::Error;
33
34 try {
35 ...
36 throw Courier::Error($error_message) if $error_condition;
37 ...
38 }
39 catch Courier::Error with {
40 ...
41 };
42 # See "Error" for more exception handling syntax.
43  
44 =head2 Deriving new exception classes
45  
46 package Courier::Error::My;
47 use base qw(Courier::Error);
48  
49 =head1 DESCRIPTION
50  
51 This class is a simple exception class for Perl modules related to the Courier
52 MTA. See L<Error> for detailed instructions on how to use it.
53  
54 =head1 SEE ALSO
55  
56 For AVAILABILITY, SUPPORT, and LICENSE information, see
57 L<Courier::Filter::Overview>.
58  
59 =head1 AUTHOR
60  
61 Julian Mehnle <julian@mehnle.net>
62  
63 =cut
64  
65 TRUE;