]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/ocaml/ocaml/contrib/camlp4/examples/global_handler_test.ml
Update
[l4.git] / l4 / pkg / ocaml / ocaml / contrib / camlp4 / examples / global_handler_test.ml
1 open Format;;
2 let f1 x = printf "f1 %d@." x;;
3 let f2 x = printf "f2 %f@." x;;
4 let f3 x = printf "f3 %s@." x;;
5 f1 1;;
6 f2 1.1;;
7 f3 "1.1.1";;
8 raise (Failure "test");;
9 let global_handler e =
10   (* Note that I need to give the complete name for eprintf since
11      Format is not opened in the new environment of global_handler. *)
12   Format.eprintf "global_handler: %s@." (Printexc.to_string e)