(* '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
open Curses
+open Virt_top_gettext.Gettext
open Virt_top
(* Note: make sure we catch any exceptions and clean up the display.
let ((_, _, script_mode, _, _, _, _) as setup) = start_up () in
try
+ Printexc.record_backtrace true;
main_loop setup;
if not script_mode then endwin ();
false
| 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 () =