of_ocaml for exceptions