Here's a new test case for t/pmc/sub.t

########
output_is(<<'CODE', <<'OUTPUT', "set_eh - throw - clear_eh");
    print "start\n"
    newsub P20, .Exception_Handler, _handler
    set_eh P20
    new P30, .Exception
    throw P30
    print "not reached\n"
    end
_handler:
    clear_eh
    print "caught it\n"
    end
CODE
start
caught it
OUTPUT
#########


If I run this code from the perl test harness or 
from my python test suite, it actually kills 
perl/python, leaving nothing but the message "Quit".

If I run the code directly from parrot, I get:

########################
static
Parrot VM: PANIC: Tried to clear_eh a non Exception_Handler!
C file exceptions.c, line 143
Parrot file (unknown file), line 0

We highly suggest you notify the Parrot team if you have not been working on
Parrot.  Use bugs6.perl.org or send an e-mail to [EMAIL PROTECTED]
Include the entire text of this error message and the text of the script that
generated the error.  If you've made any modifications to Parrot, please
describe them as well.

Version     : 0.0.10-devel
Configured  : Sun Aug 10 16:34:12 2003
Architecture: i386-linux
JIT Capable : Yes
Interp Flags: 0x40
Exceptions  : (missing from core)

Dumping Core...
Quit
#######################


I don't know if my test is right or not, but I'm
expecting the exception handler to still be around
after the exception is caught. 

I don't care if it goes away after the exception is 
caught, but I need a way to clear the exception 
handler after I get out of the try/except or 
try/finally block... Otherwise later exceptions
will bring me backward in the code. :/


Sincerely,
 
Michal J Wallace
Sabren Enterprises, Inc.
-------------------------------------
contact: [EMAIL PROTECTED]
hosting: http://www.cornerhost.com/
my site: http://www.withoutane.com/
--------------------------------------

Reply via email to