Commits

Dmitry Grebeniuk  committed f017ceb Draft

errors

  • Participants
  • Parent commits 5917474

Comments (0)

Files changed (1)

     )
 
 let () =
-  match Sys.argv with
-  | [| _me ; arg |] -> read_all arg
-  | _ -> failwith "you must specify exactly one argument"
+  let err msg = (eprintf "error from slicer.ml: %s\n" msg; exit 1) in
+  try
+    match Sys.argv with
+    | [| _me ; arg |] -> read_all arg
+    | _ -> failwith "you must specify exactly one argument"
+  with
+  | Failure msg -> err msg
+  | e -> err (Printexc.to_string e)