|
|
| version 1.1, 2026/09/26 17:51:49 | version 1.2, 2026/09/26 19:09:06 |
|---|---|
| Line 1 | Line 1 |
| # The request gets one recovery reserve (feature #1298) | # The request gets recovery reserve many times (feature #1298) |
| @main[][i] | @main[][i] |
| $report[ $.caught(0) $.finally(0) $.after(false) ] | $report[ $.caught(0) $.finally(0) ] |
| ^for[i](1;10){ | ^for[i](1;5){ |
| $calls(0) | $calls(0) |
| ^try{^recurse[]}{ | ^try{^recurse[]}{ |
| $report.caught($report.caught+1) | $report.caught($report.caught+1) |
| Line 12 $report[ $.caught(0) $.finally(0) $.afte | Line 12 $report[ $.caught(0) $.finally(0) $.afte |
| } | } |
| } | } |
| $report.after(true) | $report.after(true) |
| # the handler itself may run away and recover on its own | |
| ^try{^recurse[]}{ | |
| ^try{^recurse[]}{ | |
| $report.caught_in_catch(true) | |
| $exception.handled(true) | |
| } | |
| $exception.handled(true) | |
| } | |
| # the handler runs away too, yet finally still gets its own reserve | |
| ^try{ | |
| ^try{^recurse[]}{ | |
| ^recurse[] | |
| }{ | |
| ^try{^recurse[]}{ | |
| $report.caught_in_finally(true) | |
| $exception.handled(true) | |
| } | |
| } | |
| }{ | |
| $report.catch_error_propagated(true) | |
| $report.finally_error[$exception.comment] | |
| $exception.handled(true) | |
| } | |
| ^json:string[$report; $.indent(true)] | ^json:string[$report; $.indent(true)] |
| @recurse[] | @recurse[] |
| Line 20 $calls($calls+1) | Line 45 $calls($calls+1) |
| @unhandled_exception[exception;stack] | @unhandled_exception[exception;stack] |
| $exception.handled(true) | $exception.handled(true) |
| $report.final_calls($calls) | |
| $report.error[$exception.comment] | $report.error[$exception.comment] |
| ^json:string[$report; $.indent(true)] | ^json:string[$report; $.indent(true)] |