let func level =
fun name pp qq f a ->
try
whitespace level !indent;
indent := !indent + 1;
call level name a pp;
let b = f a in
indent := !indent - 1;
whitespace level !indent;
exit level name b qq;
b
with
| exc ->
begin
indent := !indent - 1;
whitespace level !indent;
(if is_active level then
Format.eprintf "Exit: %s@." (Printexc.to_string exc));
raise exc
end