X-Git-Url: http://git.annexia.org/?p=virt-top.git;a=blobdiff_plain;f=virt-top%2Fvirt_top_main.ml;h=4e5c07b6c8cb3e3fae2f42576dd4da8afe4f3867;hp=ba98e7e5e2533da1d05ee125996aad3fb7b684ce;hb=1f3c5a55e0dbbab20fcd23cd81689e0f6ca72669;hpb=3126bfee333b5c635dc60a54265936af06117f6a diff --git a/virt-top/virt_top_main.ml b/virt-top/virt_top_main.ml old mode 100755 new mode 100644 index ba98e7e..4e5c07b --- a/virt-top/virt_top_main.ml +++ b/virt-top/virt_top_main.ml @@ -1,5 +1,5 @@ (* 'top'-like tool for libvirt domains. - (C) Copyright 2007 Richard W.M. Jones, Red Hat Inc. + (C) Copyright 2007-2009 Richard W.M. Jones, Red Hat Inc. http://libvirt.org/ This program is free software; you can redistribute it and/or modify @@ -21,6 +21,7 @@ open Curses +open Virt_top_gettext.Gettext open Virt_top (* Note: make sure we catch any exceptions and clean up the display. @@ -33,6 +34,7 @@ let error = let ((_, _, script_mode, _, _, _, _) as setup) = start_up () in try + Printexc.record_backtrace true; main_loop setup; if not script_mode then endwin (); false @@ -40,10 +42,12 @@ let error = | Libvirt.Virterror err -> if not script_mode then endwin (); prerr_endline (Libvirt.Virterror.to_string err); + Printexc.print_backtrace stderr; true | exn -> if not script_mode then endwin (); - prerr_endline ("Error: " ^ Printexc.to_string exn); + prerr_endline (s_ "Error" ^ ": " ^ Printexc.to_string exn); + Printexc.print_backtrace stderr; true let () =