[perl #38432] [BUG] Exception thrown from constructor leads to oddness
Will Coleda via RT
parrotbug-followup at parrotcode.org
Thu Jul 9 13:23:48 UTC 2009
On Wed Oct 15 12:42:23 2008, coke wrote:
> On Tue Sep 16 18:20:36 2008, amosrobinson wrote:
> > No segfaults here either, with your PIR. (r31173, vanilla ubuntu)
> >
> > On Tue Sep 02 12:45:34 2008, tene wrote:
> > > I don't get a segfault when running the test case without the
'end'
> > > opcode. Can anyone else confirm if this still segfaults?
> >
>
> Here's yet another updated version (this time for the exception
handler)
> of the test that doesn't segfault, but still generates incorrect
output
> (generates both an OK line and a NOK line)
Here is yet another updated version of the code:
.sub main :main
.local pmc type
newclass type, 'Parent'
.local pmc obj, exception
.local string message
message = 'no error'
push_eh handler
obj = new 'Parent'
print 'not '
pop_eh
goto finally
handler:
.get_results(exception)
pop_eh
message = exception
finally:
print "ok #"
say message
.end
.namespace ['Parent']
.sub 'init' :vtable
die 'test exception from init vtable'
.end
Which generates:
ok #test exception from init vtable
not No handler to delete.
The second line should not be printing.
--
Will "Coke" Coleda
More information about the parrot-dev
mailing list