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

7 lines
149 B
OCaml
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
try
string_of_int (foo 2)
with
My_Exception -> "got my exception"
| Another_Exception s -> s
| _ -> "unknown exception"