File:  [parser3project] / parser3 / tests / 456.html
Revision 1.1: download - view: text, annotated - select for diffs - revision graph
Sat Sep 26 17:51:49 2026 UTC (4 weeks ago) by moko
Branches: MAIN
CVS tags: HEAD
tests for EXECUTE_RECURSION_RESERVE added (related to feature #1298)

# Recursion in finally must terminate instead of repeatedly resetting the counter (feature #1298)
@main[]
$report[$.caught(0) $.finally(0) $.outer_catch(false) $.outer_finally(false) $.after(false)]
^try{^recurse[]}{
 $report.outer_catch(true)
 $exception.handled(true)
}{
 $report.outer_finally(true)
}
$report.after(true)
^json:string[$report; $.indent(true)]

@recurse[]
^try{^recurse[]}{
 $report.caught($report.caught+1)
 $report.first_error[$exception.comment]
 ^throw[;before fix: this resets recursion limit for finally code]
}{
 $report.finally($report.finally+1)
 ^recurse[]
}

@check_free_stack[n]
^if($n>0){^check_free_stack($n-1)}{$report.check_free_stack(true)}

@unhandled_exception[exception;stack]
$exception.handled(true)
$report.error[$exception.comment]
^check_free_stack[50]
^json:string[$report; $.indent(true)]

E-mail: