On Sun Aug 23 01:32:59 2009, carlin wrote:
> > say Exception;
> Segmentation fault
> 
> 
> <carlin> rakudo: say Exception;
> <p6eval> rakudo 0d4fe0:  ( no output )

I'll go out on a limb and guess that the following behaviours are related.

$ perl6 -e 'eval "RONG" or say $!.PARROT'
Perl6Exception

Fair enough.

$ perl6 -e 'eval "RONG" or say $!.WHAT'
Segmentation fault

$ perl6 -e 'eval "RONG" or die $!'
Not a throwable object

$ perl6 -e 'eval "RONG" or say $!.^methods(:local)>>.name.perl'
["", "resume", "rethrow", "perl"]

$ perl6 -e 'eval "RONG" or $!.resume'
Null PMC access in invoke()
[...]

$ perl6 -e 'eval "RONG" or $!.rethrow'
Not a throwable object
[...]

$ perl6 -e 'eval "RONG" or say $!.perl'
undef

Questions:

1. What's the empty-string thing at the start of the .^methods list?

2. If '.resume' and '.rethrow' don't work, why are they exposed to the 
user?

3. Why is the '.perl' representation of the exception 'undef'? Recall that 
'.perl' should generally return a runnable expression recreating the 
original value as faithfully as possible.

4. Why can't I do '.WHAT' on the object?

5. Of all the things that the 'die' function doesn't handle, how come it 
refuses to die with an exception object? And of all the error messages, 
how come with 'not a throwable object'? Are Str objects more throwable 
than Exception objects?

Reply via email to