let func level name pp qq f a =
if is_active level then
begin
try
call level name a pp;
let b = f a in
exit level name b qq;
b
with
| exc -> fail level name exc
end
else
f a