[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Mldonkey-commits] Changes to mldonkey/src/utils/cdk/printexc2.ml
From: |
mldonkey-commits |
Subject: |
[Mldonkey-commits] Changes to mldonkey/src/utils/cdk/printexc2.ml |
Date: |
Wed, 06 Jul 2005 20:25:53 -0400 |
Index: mldonkey/src/utils/cdk/printexc2.ml
diff -u mldonkey/src/utils/cdk/printexc2.ml:1.2
mldonkey/src/utils/cdk/printexc2.ml:1.3
--- mldonkey/src/utils/cdk/printexc2.ml:1.2 Fri Jan 30 06:11:07 2004
+++ mldonkey/src/utils/cdk/printexc2.ml Thu Jul 7 00:25:46 2005
@@ -19,7 +19,7 @@
open Printf2;;
open Printf
-
+
let locfmt =
Obj.magic (match Sys.os_type with
| "MacOS" -> "File \"%s\"; line %d; characters %d to %d ### %s"
@@ -83,31 +83,28 @@
raise x
let register_exn f = printers := f :: !printers
-
+
let catch s f x =
try f x with
e ->
- lprintf "Uncaught exception in %s: %s" s (to_string e);
- lprint_newline ()
-
+ lprintf_nl "Uncaught exception in %s: %s" s (to_string e)
+
let catch2 s f x y =
try f x y with
e ->
- lprintf "Uncaught exception in %s: %s" s (to_string e);
- lprint_newline ()
-
+ lprintf_nl "Uncaught exception in %s: %s" s (to_string e)
+
let vcatchexn s f =
try Some (f ()) with
e ->
- lprintf "Uncaught exception in %s: %s" s (to_string e);
- lprint_newline ();
+ lprintf_nl "Uncaught exception in %s: %s" s (to_string e);
None
let _ =
register_exn (fun e ->
match e with
Unix.Unix_error (e, f, arg) ->
- Printf.sprintf "%s failed%s: %s" f (if arg = "" then "" else
+ Printf.sprintf "%s failed%s: %s" f (if arg = "" then "" else
"on " ^ arg) (Unix.error_message e)
| _ -> raise e
)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Mldonkey-commits] Changes to mldonkey/src/utils/cdk/printexc2.ml,
mldonkey-commits <=