[Bioperl-l] Exceptions and Interfaces
Chervitz, Steve
Steve_Chervitz@affymetrix.com
Mon, 23 Apr 2001 14:19:26 -0700
Jason Stajich [mailto:jason@chg.mc.duke.edu] wrote:
> [Shaking cobwebs of jetlag off, cursing sanger firewall]
>
> On Sun, 22 Apr 2001, Ewan Birney wrote:
>
> >
> > My take on this is that our current throw() mechanism is
> really "Error.pm
> > written for ourselves". Error.pm is becoming the standard
> and I think at
> > some point we have to bite the bullet and use this rather
> than strings.
> >
> >
> > As for hilmar's point --- I agree that we shouldn't require
> some model to
> > be bioperl compliant.
> >
> Ditto. I like the capabilities of Error.pm - wonder if anyone
> is plugged
> into perl dev lists to see what capabilities are planned to
> be 'standard'
> wrt exceptions. Nat Torkinton was plugged into bioperl at some point
> might be worthwhile to ping him.
My sense is that something Error.pm-like is planned for Perl 6 (see
http://dev.perl.org/rfc/63.pod as well as 88.pod), but I don't know if
anything is planned for the 5.* branch appart from being able to die with
objects in $@. But it would be good to hear something from someone in the
know.
> >
> >
> > Over all I think the aim would be to move towards allowing
> Error.pm being
> > "thrown" as well as strings, with RootI probably making a
> > Bio::Root::StringException for current $self->throw("this is a
> > message") and allow $self->throw($exception) (assumming
> this is the way
> > Error.pm works). We should probably have another
> Bio::Root::Exception
> > class which handles the stack trace deduction etc...
> >
>
> Stack traces are really the functionality we are building on top of
> Error.pm. Might even be sensible to create a StackTrace
> module to submit
> to CPAN as I think this is a very reasonable functionality. Setting
> verbosity levels as well have proven to be useful to a number
> of modules.
Verbosity is useful, but it's on a different level than exception throwing.
Each object knows how verbose it should be. (I wonder if there's anything in
the Perl 6 RFPs about this...). See my reply to Ewan about stack traces in
Error.pm.
Steve
> >
> >
> > I agree with Hilmar that this is not a must-have for
> bioperl... but if you
> > want to roll it in then I'd be happy to have it ;)
> >
> I agree - I think doing it sensibly will be an asset worth
> spending the
> time on.
>
> >
> > -----------------------------------------------------------------
> > Ewan Birney. Mobile: +44 (0)7970 151230, Work: +44 1223 494420
> > <birney@ebi.ac.uk>.
> > -----------------------------------------------------------------
> >
> >
>
> Jason Stajich
> jason@chg.mc.duke.edu
> Center for Human Genetics
> Duke University Medical Center
> http://www.chg.duke.edu/
>
>