AutoTeX/Exception.pm

filter: Statementstmt 87.7% 43 / 49 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 91.6% 11 / 12 Podpod 100% 1 / 1 totaltotal 88.7% 55 / 62 CC 1 SCAR 0.8
CC
1
Cov
88%
new
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
« AutoTeX/Fileset.pm ↑ Summary AutoTeX/Config.pm »
1 package TeX::AutoTeX::Exception;
2  
3 #
4 # $Id: Exception.pm,v 1.7.2.7 2011/01/27 18:42:27 thorstens Exp $
5 # $Revision: 1.7.2.7 $
6 # $Source: /cvsroot/arxivlib/arXivLib/lib/TeX/AutoTeX/Exception.pm,v $
7 #
8 # $Date: 2011/01/27 18:42:27 $
9 # $Author: thorstens $
10 #
11  
12 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 ### use warnings;
14  
15 2 our ($VERSION) = '$Revision: 1.7.2.7 $' =~ m{ \$Revision: \s+ (\S+) }x;
16  
17 2 ▶use parent qw(Error);
Subroutine BEGIN: called CC=1 SCAR=0.0
18 2 ▶use overload (q{""} => 'stringify');
Subroutine BEGIN: called CC=1 SCAR=0.0
19  
20 0 ▶sub new {
Subroutine new: not called CC=1 SCAR=6.9
Pod documented
21 0 my $self = shift;
22 0 my $text = shift() . "\n";
23 0 my @args = ();
24  
25 0 local $Error::Depth = $Error::Depth + 1;
26 0 local $Error::Debug = 1; # Enables storing of stacktrace
27  
28 0 $self->SUPER::new(-text => $text, @args);
29 }
30 2 1;
31  
32 package TeX::AutoTeX::FatalException;
33 2 ▶use parent qw(TeX::AutoTeX::Exception);
Subroutine BEGIN: called CC=1 SCAR=0.0
34 2 1;
35 package TeX::AutoTeX::FormatException;
36 2 ▶use parent qw(TeX::AutoTeX::Exception);
Subroutine BEGIN: called CC=1 SCAR=0.0
37 2 1;
38 package TeX::AutoTeX::InvNameException;
39 2 ▶use parent qw(TeX::AutoTeX::Exception);
Subroutine BEGIN: called CC=1 SCAR=0.0
40 2 1;
41 package TeX::AutoTeX::MissfontException;
42 2 ▶use parent qw(TeX::AutoTeX::Exception);
Subroutine BEGIN: called CC=1 SCAR=0.0
43 2 1;
44 package TeX::AutoTeX::TexChrException;
45 2 ▶use parent qw(TeX::AutoTeX::Exception);
Subroutine BEGIN: called CC=1 SCAR=0.0
46 2 1;
47 package TeX::AutoTeX::TexMFCnfException;
48 2 ▶use parent qw(TeX::AutoTeX::Exception);
Subroutine BEGIN: called CC=1 SCAR=0.0
49 2 1;
50 package TeX::AutoTeX::TypeException;
51 2 ▶use parent qw(TeX::AutoTeX::Exception);
Subroutine BEGIN: called CC=1 SCAR=0.0
52 2 1;
53 package TeX::AutoTeX::WorkdirException;
54 2 ▶use parent qw(TeX::AutoTeX::Exception);
Subroutine BEGIN: called CC=1 SCAR=0.0
55 2 1;
56  
57 =for stopwords arxiv.org arXiv.org Schwander perlartistic www-admin
58  
59 =head1 NAME
60  
61 TeX::AutoTeX::Exception - framework for exception handling in TeX::AutoTeX
62  
63 =head1 DESCRIPTION
64  
65 This is the base class for exception handling. The idea is to subclass this
66 for specific error conditions. Each of the Exception classes (stubs) above
67 can be customized individually to meet specific needs. More types can be
68 easily added if necessary.
69  
70 =head1 METHODS
71  
72 =head2 new
73  
74 Instantiate an Exception object with customization of the textual
75 representation of the error message.
76  
77 =head1 BUGS AND LIMITATIONS
78  
79 Using the C<Error> module is no longer recommended. Exception handling should be
80 migrated to something like C<Try::Tiny> or C<Error::TryCatch>.
81  
82 Please report bugs to L<www-admin|http://arxiv.org/help/contact>
83  
84 =head1 AUTHOR
85  
86 Thorsten Schwander for L<arXiv.org|http://arXiv.org/>
87  
88 =head1 LICENSE AND COPYRIGHT
89  
90 Copyright (c) 2008 - 2010 arxiv.org L<http://arXiv.org/help/contact>
91  
92 This module is free software; you can redistribute it and/or modify it under
93 the same terms as Perl itself. See
94 L<perlartistic|http://www.opensource.org/licenses/artistic-license-2.0.php>.
95  
96 =cut
« AutoTeX/Fileset.pm ↑ Summary AutoTeX/Config.pm »