+let pretty_string_of_exn =
+ function
+ | Guestfs.Error str ->
+ "Libguestfs error",
+ sprintf "libguestfs reported an error:
+
+%s
+
+To get more information about libguestfs errors, run guestfs-browser
+with the -x flag on the command line."
+ str
+
+ (* Add more exception types here as we come across them. Last
+ * case below is the catch-all.
+ *)
+ | exn ->
+ "Error", Printexc.to_string exn
+