Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Most of our code uses Error::Simple subclasses (Error objects henceforth) to throw and/or catch thrown exceptions as Error objects. In some portions of the code, exceptions are thrown with &Carp::croak (or occassionaly with &die).
Should the croak's be handled via eval{}-$@, or via try-catch even though croak's are not Error objects? Put it other way, would there be problem in using Error objects to capture plain croak (or, die)? (perl is 5.8.[78].)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Error::Simple or eval{} use to capture &Carp::croak
by bluestar (Novice) on Sep 03, 2009 at 13:06 UTC | |
by Anonymous Monk on Sep 04, 2009 at 02:34 UTC | |
by SFLEX (Chaplain) on Sep 04, 2009 at 22:47 UTC | |
|
Re: Error::Simple or eval{} use to capture &Carp::croak
by SFLEX (Chaplain) on Sep 04, 2009 at 10:44 UTC | |
by Anonymous Monk on Sep 04, 2009 at 11:50 UTC |