X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=utils.ml;h=3afcf99be5f1b5cb04c8d56cd3ea71af4424fa4f;hb=fb002571a0432d83a25487c2644fc831180c4443;hp=e3e99199afa30cb9b02c93712dd785d06c1f75f6;hpb=674ec31578216d728c4ab9c0a8a297e47c81c492;p=guestfs-browser.git diff --git a/utils.ml b/utils.ml index e3e9919..3afcf99 100644 --- a/utils.ml +++ b/utils.ml @@ -76,11 +76,25 @@ To get more information about libguestfs errors, run guestfs-browser with the -x flag on the command line." str + | Libvirt.Virterror err -> + "Libvirt error", + sprintf "libvirt reported an error: + +%s + +To get more information about libvirt errors, run guestfs-browser +from the command line like this: + +LIBVIRT_DEBUG=1 guestfs-browser" + (Libvirt.Virterror.to_string err) + (* Add more exception types here as we come across them. Last * case below is the catch-all. *) | exn -> - "Error", Printexc.to_string exn + let str = Printexc.to_string exn in + debug "pretty_string_of_exn: unhandled exception %s" str; + "Error", str let human_size i = if i < 1024L then