~ubuntu-branches/ubuntu/hoary/bioperl/hoary

« back to all changes in this revision

Viewing changes to Bio/Root/Err.pm

  • Committer: Bazaar Package Importer
  • Author(s): Matt Hope
  • Date: 2004-04-18 14:24:11 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20040418142411-gr92uexquw4w8liq
Tags: 1.4-1
* New upstream release
* Examples and working code are installed by default to usr/bin,
  this has been moved to usr/share/doc/bioperl/bin

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
# PACKAGE : Bio::Root::Err.pm
3
3
# AUTHOR  : Steve Chervitz (sac@bioperl.org)
4
4
# CREATED : 22 July 1996
5
 
# REVISION: $Id: Err.pm,v 1.12 2002/01/18 08:21:17 sac Exp $
 
5
# REVISION: $Id: Err.pm,v 1.16 2003/06/04 08:36:42 heikki Exp $
6
6
# STATUS  : Alpha
7
7
#
8
8
# For documentation, run this module through pod2html
31
31
                 std  => [qw(&throw &warning)]
32
32
                );
33
33
 
34
 
use vars qw($ID $VERSION);
 
34
use vars qw($ID);
35
35
$ID = 'Bio::Root::Err';
36
 
$VERSION = 0.041;
37
36
 
38
37
%Bio::Root::Err::ERR_FIELDS = (TYPE=>1, MSG=>1, NOTE=>1, CONTEXT=>1,
39
38
                               TECH=>1, STACK=>1 );
45
44
 
46
45
=head1 NAME
47
46
 
48
 
Bio::Root::Err.pm -  Exception class for Perl 5 objects
 
47
Bio::Root::Err -  Exception class for Perl 5 objects
49
48
 
50
49
=head1 SYNOPSIS
51
50
 
81
80
   http://bio.perl.org/Core/Latest
82
81
   ftp://bio.perl.org/pub/DIST
83
82
 
84
 
Follow the installation instructions included in the README file.
 
83
Follow the installation instructions included in the INSTALL file.
85
84
 
86
85
=head1 DESCRIPTION
87
86
 
89
88
working with errors and exceptional conditions that arise in Perl objects.
90
89
There are no biological semantics in this module, as one may suspect from its
91
90
location in the Bio:: hierarchy. The location of this module serves to
92
 
separate it from the namespaces of other Perl Error modules. It also makes it convenient
93
 
for use by Bio:: objects.
 
91
separate it from the namespaces of other Perl Error modules. It also makes it
 
92
convenient for use by Bio:: objects.
94
93
 
95
94
The motivation for having an error object is to allow
96
95
Perl 5 objects to deal with errors or exceptional conditions that
102
101
     a web-user needs different information than does the
103
102
     software engineer.
104
103
 
105
 
Bio::Root::Err.pm, along with B<Bio::Root::Object.pm>, attempt to make such problems
106
 
tractable. Please see the B<Bio::Root::Object.pm> documentation for more about
107
 
my error handling philosophy.
 
104
Bio::Root::Err.pm, along with B<Bio::Root::Object.pm>, attempt to make such
 
105
problems tractable. Please see the L<Bio::Root::Object> documentation for more
 
106
about my error handling philosophy.
108
107
 
109
 
A B<Bio::Root::Err.pm> object is an example of a Vector-Object: This module inherits
110
 
both from B<Bio::Root::Object.pm> and B<Bio::Root::Vector.pm>. This permits a single Err
111
 
object to exist within a linked list of Err objects OR alone.
112
 
See the B<Bio::Root::Vector.pm> documentation for more about Vector-Objects.
 
108
A B<Bio::Root::Err.pm> object is an example of a Vector-Object: This module
 
109
inherits both from B<Bio::Root::Object.pm> and B<Bio::Root::Vector.pm>. This
 
110
permits a single Err object to exist within a linked list of Err objects OR
 
111
alone. See the L<Bio::Root::Vector> documentation for more about Vector-Objects.
113
112
 
114
113
B<The API for this module is not complete since the module is under development.>
115
114
 
127
126
For now the Err.pm object is reconstructed from the output of L<string>().
128
127
 
129
128
There are some other third-party Exception classes such as
130
 
Torsten Ekedahl's B<Experimental::Exception.pm> or
131
 
Ken Steven's Throwable.pm or
 
129
Torsten Ekedahl's B<Experimental::Exception.pm> or Ken Steven's Throwable.pm or
132
130
Graham Barr's Error.pm (see L<Other Exception Modules>). These modules
133
 
attempt to introduce a traditional "try-catch-throw"
134
 
exception handling mechanism into Perl. Future version of my modules
135
 
(and perhaps erl itself) may utilize one of these.
 
131
attempt to introduce a traditional "try-catch-throw" exception handling mechanism
 
132
into Perl. Future version of my modules (and perhaps Perl itself) may utilize one
 
133
of these.
136
134
 
137
135
=head1 USAGE
138
136
 
139
 
A demo script that illustrates working with Bio::Root::Err objects is available at:
140
 
 
141
 
    http://bio.perl.org/Core/Examples/Root_object/error.pl
 
137
A demo script that illustrates working with Bio::Root::Err objects is
 
138
examples/root_object/error.pl.
142
139
 
143
140
 
144
141
=head1 DEPENDENCIES
163
160
their resolution. Bug reports can be submitted via email or the web:
164
161
 
165
162
    bioperl-bugs@bio.perl.org
166
 
    http://bio.perl.org/bioperl-bugs/
 
163
    http://bugzilla.bioperl.org/
167
164
 
168
165
=head1 AUTHOR Steve Chervitz
169
166