#944: Exception handling in top-level main function is broken.
--------------------+-------------------------------------------------------
 Reporter:  bacek   |       Owner:       
     Type:  bug     |      Status:  new  
 Priority:  normal  |   Milestone:       
Component:  core    |     Version:  trunk
 Severity:  medium  |    Keywords:       
     Lang:          |       Patch:       
 Platform:          |  
--------------------+-------------------------------------------------------

Comment(by NotFound):

 Use unroll:

 {{{
 .sub main :main
     $P0 = newclass 'Foo'
     $P0 = new ['Foo']
     push_eh catch
     $S0 = $P0
     say "huh?"
     .return()
  catch:
     .get_results($P1)
     unroll $P1
     say "caught"
     .return()
 .end

 .namespace ['Foo']

 .sub get_string :vtable :method
     $P0 = new ['Exception']
     throw $P0
 .end
 }}}

 See TT #1635

-- 
Ticket URL: <https://trac.parrot.org/parrot/ticket/944#comment:6>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets

Reply via email to