RosettaCodeData/Task/Exceptions/OCaml/exceptions-3.ocaml

7 lines
149 B
Text
Raw Permalink Normal View History

2013-04-10 22:43:41 -07:00
try
string_of_int (foo 2)
with
My_Exception -> "got my exception"
| Another_Exception s -> s
| _ -> "unknown exception"