Only bad things can happen if the exception gets out.

Signed-off-by: Jon Ludlam <[email protected]>


 ocaml/xapi/xapi_fuse.ml |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


# HG changeset patch
# User Jonathan Ludlam <[email protected]>
# Date 1277123645 -3600
# Node ID 7ade3f4c3a34d4596edc2b3aa56182793db2a2ac
# Parent  4f9f896fb691d71492f8c357ac9c411c37f86a76
If there is any error in syncing the RRDs while shutting down, don't let the exception propagate.
Only bad things can happen if the exception gets out.

Signed-off-by: Jon Ludlam <[email protected]>

diff -r 4f9f896fb691 -r 7ade3f4c3a34 ocaml/xapi/xapi_fuse.ml
--- a/ocaml/xapi/xapi_fuse.ml
+++ b/ocaml/xapi/xapi_fuse.ml
@@ -19,7 +19,7 @@
 
 let time f = 
   let start = Unix.gettimeofday () in
-  f ();
+  (try f () with e -> warn "Caught exception while performing timed function: %s" (Printexc.to_string e));
   Unix.gettimeofday () -. start
 
 (* give xapi time to reply to API messages by means of a 10 second fuse! *)
_______________________________________________
xen-api mailing list
[email protected]
http://lists.xensource.com/mailman/listinfo/xen-api

Reply via email to