# New Ticket Created by  Brian Charles Gernhardt 
# Please include the string:  [perl #96028]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=96028 >


While testing out CATCH, I tried the Rosetta Code example for exceptions: 

http://rosettacode.org/wiki/Exceptions#Perl_6
> try { die "Help I'm dieing!"; CATCH { note $_.uc; say "Cough, Cough, Aiee!!" 
> } }
>  
> CATCH { note "No you're not."; say $_; }
>  
> say "Yay. I'm alive.";
>  
> die "I'm dead.";
>  
> say "Arrgh.";

This quite unhelpfully segfaulted.  I finally golfed it down to:

> die 'a'; CATCH { .uc }

Some experimenting discovered that any unknown method on an Exception causes a 
segfault:

> die 'a'; CATCH { .bogus }

Reply via email to