let catch_all f handler = catch (fun () -> catch_exn f) handler