Re: Of fail, exceptions and catching

2005-05-11 Thread Aaron Sherman
On Wed, 2005-05-11 at 09:50, Luke Palmer wrote: > Oh, just to avoid further confusion: In the baz() called under fatal, > it will only turn undefs that were generated by "fail" calls into > exceptions. Other sorts of undefs will be returned as ordinary > undefs. Ok, so let me try to get my head

Re: Of fail, exceptions and catching

2005-05-11 Thread Luke Palmer
On 5/11/05, Luke Palmer <[EMAIL PROTECTED]> wrote: > sub foo() { > fail; > } > > use fatal; > sub bar() { > foo(); # foo() throws exception > } > > no fatal; > sub baz() { > foo(); # foo() returns undef > } > > use fatal; > bar(

Re: Of fail, exceptions and catching

2005-05-11 Thread Luke Palmer
On 5/11/05, Aaron Sherman <[EMAIL PROTECTED]> wrote: > Given: > > "fail" with configurable behavior > "no fatal" to make "fail" just warn Juerd is right here, it doesn't warn. Instead of "die"ing, it returns an undef with some helpful diagnostic information (an "unthrown exceptio

Re: Of fail, exceptions and catching

2005-05-11 Thread Juerd
Aaron Sherman skribis 2005-05-11 7:44 (-0400): > "no fatal" to make "fail" just warn I thought it wouldn't warn, but instead silently return undef (an unthrown exception). Juerd -- http://convolution.nl/maak_juerd_blij.html http://convolution.nl/make_juerd_happy.html http://convolution.