File:  [parser3project] / parser3 / tests / 457.html
Revision 1.2: download - view: text, annotated - select for diffs - revision graph
Sat Sep 26 19:09:06 2026 UTC (3 weeks, 6 days ago) by moko
Branches: MAIN
CVS tags: HEAD
test and it's results updated after recursion_limit_try_restore added (related to feature #1298)

# The request gets recovery reserve many times (feature #1298)
@main[][i]
$report[ $.caught(0) $.finally(0) ]
^for[i](1;5){
    $calls(0)
    ^try{^recurse[]}{
        $report.caught($report.caught+1)
        $report.calls_$i($calls)
        $exception.handled(true)
    }{
        $report.finally($report.finally+1)
    }
}
$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)]

@recurse[]
$calls($calls+1)
^recurse[]

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

E-mail: