# 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: