Bioperl: State of the art in perl Exception modules?

Mr P.A. Van Heusden
Mon, 15 Nov 1999 12:40:21 +0000 (GMT)

On Fri, 22 Oct 1999, Ewan Birney wrote:


> I am very happy with teh bioperl exceptions, but my handling tends to be
> either "catch everything" or "catch nothing". Your milage may vary.

Hi Ewan

I've now been playing with BioPerl exceptions for a while (as I convert my
code into children of Bio::Root::Object), and they seem to work well (I
like the debugging output they give when not caught). As you say, though,
it is pretty much an all or nothing case. 

There are essentially, as I see it, two ways forward for refining this:

1) Standardize on an 'exception string' like:

 $self->throw('IO ERROR: blah blah');


2) Allow for exception classes - so

 $self->throw('IOERROR', 'blah blah');

The tendency in exception schemes I've seen seems to be to use the second.
Would it be worthwhile working on this for BioPerl?

Peter van Heusden : : PGP key available
Criticism has torn up the imaginary flowers from the chain not so that man
shall wear the unadorned, bleak chain but so that he will shake off the 
chain and pluck the living flower. - Karl Marx 
           NOTE: I do not speak for the HGMP or the MRC.

=========== Bioperl Project Mailing List Message Footer =======
Project URL:
For info about how to (un)subscribe, where messages are archived, etc: