[OCaml] Smarter error handling