#1151: Exception thrown from constructor leads to oddness
--------------------+-------------------------------------------------------
Reporter: coke | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: none | Version: trunk
Severity: medium | Keywords:
Lang: | Patch:
Platform: |
--------------------+-------------------------------------------------------
Comment(by NotFound):
The unroll opcode has been renamed to finalize, here is the snippet
updated:
{{{
.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)
finalize exception
pop_eh
message = exception
finally:
print "ok #"
say message
.end
.namespace ['Parent']
.sub 'init' :vtable
die 'test exception from init vtable'
.end
}}}
I think the ticket must remain open until finalize goes out of
experimental stage and becomes part of the recommended way of handling
exceptions.
--
Ticket URL: <https://trac.parrot.org/parrot/ticket/1151#comment:3>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets